lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


2011/2/16 KHMan <keinhong@gmail.com>:
> Sorry to barge in, it is a worrying difference. One thing is bugging me: Is
> the C code running SSE2? IIRC gcc -O2 does not normally enable SSE2.

Hmmm, I've to confess that I don't have a very deep knowledge of
SSE-related optimization flags. My approach was quite naive, I use
standard optimization flags like "-O2" or "-O2 -fomit-frame-pointer"
and I leave gcc doing his works. My idea is quite simple, I want to
compare optimized C code with LuaJIT2 and with "optimized" I just mean
"standard optimizations".

For the other side I guess your remark is good, to be completely fair
the benchmark should include the best possible optimization flags.
Probably I should use "-march=native", I believe this is activated by
default in ubuntu. Otherwise there are some flags that may be you
should not activate with GSL to not degrade the accuracy. For example
I know that you cannot use -ffast-math and I don't know if you can use
-mfpmath=sse because, if I understood correctly, with SSE you dont
have the extra precision of 80-bit wide numbers and this can
potentially degrade the accuracy.

I can make some more tests to have a more fair benchmark but this is a
little bit outside of the scope of my simple benchmark.

-- 
Francesco