I ran these benchmarks on a MacBook pro (but compiling in 32-bit mode). First, I would like to correct an earlier claim: I thought that -fno- exceptions was the default configuration, but it's not. When I specify -fno-exceptions and try to use a callback that throws an exception I get a bus error. The benchmark results: pi 100000 takes 1.23 seconds with or without -fno-exceptions exam takes 0.337 seconds without -fno-exceptions, 0.331 seconds with. It appears to me that with gcc4, -fno-exceptions has reached the point of diminishing returns. rg On May 13, 2007, at 4:32 PM, Bruno Haible wrote:
Richard B. Kreckel wrote:
I am very curious about the overhead incurred by compiling CLN without -fno-exceptions.
Here is some data. Compiled cln-1.1.13 on Linux/i386 once with CXX="g++ -fno-exceptions" and once with CXX="g++" (both with GCC 4.1.2), and performed two deterministic programs, measuring user time:
g++ -fno-exceptions g++
./exam 1.24 sec 1.35 sec ./pi 100000 > /dev/null 2.64 sec 2.64 sec
As was to be expected, the program which spends most of its time in large bignum multiplications is not slowed down. But the program which constructs many numbers and performs many (quick) computations is slowed down.
Is a slowdown of 9% significant?
Bruno
_______________________________________________ CLN-list mailing list CLN-list@ginac.de https://www.cebix.net/mailman/listinfo/cln-list