SRL Archive - S.M.A.R.T.

Optimisation?


Wizzup?

2011-02-16 17:05:34

Ben, I'm wondering. I see SMART is compiled for Windows with -O0; but Linux is -O2. If I recall correctly you originally did this because of issues with gcc for windows. Perhaps it is worth it to see if this still occurs? I can compile with the latest GCC (4.5.2), and perhaps we can then use SMART with -O2 instead of -O0. Would probably give a performance boost, no? IIRC you still did some copies on the C side?

BenLand100

2011-02-16 17:32:44

The only thing the native code does during script running is call back to java, so any performance gain would be negligible (actually negligible, i.e. less than the difference between 64 bit and 32 bit code ;) ). Native buffer coppies from within java were sufficiently fast and are always JIT compiled the way I wrote them, and doing it from within C would have been painful.

THAT BEING SAID the reason I compiled with -O0 on windows was because with -O1 or -O2 the JVM panicked and crashed the process. This might no longer be the case, feel free to experiment.