in reply to Re^3: Rosetta Code: Long List is Long (faster - vec)
in thread Rosetta Code: Long List is Long
Thanks! Yes, I'm seeing clang++ slightly faster too, but only for the limited length fixed string case.
Funny, I'd earlier tried clang++ for the non fixed string case, but it seemed to be very slightly slower than g++. That result, combined with google suggesting that g++ usually produces slightly faster executables caused me to give up on clang++.
I also fiddled with some of the many compiler parameters but felt overwhelmed by the sheer number and complexity of them, so just stuck to the basic ones for now. The natural variations in timing of each run also make it hard to be certain.
After googling, I was thinking of something like:
but was too gutless, given it needs root permissions and I didn't really know what I was doing.#!/bin/sh # Clear the caches (this needs root permissions) sync; echo 3 > /proc/sys/vm/drop_caches # Use taskset for cpu affinity (but which cpu to choose?) taskset 0x00000002 ./llil2vec big1.txt big2.txt big3.txt >f.tmp sleep 5 taskset 0x00000002 ./llil2vec big1.txt big2.txt big3.txt >f.tmp sleep 5 taskset 0x00000002 ./llil2vec big1.txt big2.txt big3.txt >f.tmp
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Rosetta Code: Long List is Long (faster - vec)
by marioroy (Prior) on Jan 09, 2023 at 12:59 UTC |