Christian Packmann schrieb:
Axel Dörfler schrieb:Christian Packmann <Christian.Packmann@xxxxxx> wrote:but if GCC4 really shouldn't be faster on Haiku while being faster in Cygwin, there has to be some reason for it.IIRC we've disabled some optimizations as our previous GCC version (3.x) was not able to produce working code without that.I'm not sure Michael enabled those again already.Gotcha. After overcoming a PEBKAC I got Haiku/GCC4 to work just now. Benchmark results with GCC 4.3.3: Minimum Average Maximum # 1: 1440027 1441143 1451102 - 'Float math, original' # 2: 740009 740856 748314 - 'FixPt math, original' # 3: 1440027 1440935 1449054 - 'Float math, better conv. #1' # 4: 1470023 1471574 1485323 - 'Float math, better conv. #1' # 5: 151112 151959 157955 - 'SSE2' GCC 2.95.3-compiled version, run on Haiku/GCC4: Minimum Average Maximum # 1: 1640032 1640892 1648523 - 'Float math, original' # 2: 665005 665914 674024 - 'FixPt math, original' # 3: 1640032 1642179 1652009 - 'Float math, better conv. #1' # 4: 1680016 1680980 1689511 - 'Float math, better conv. #1' # 5: 151113 151136 151325 - 'SSE2'With the current GCC4 we have a slight improvement in float code, but also a slight regression for integer code. So a GCC4-Haiku may be expected to run marginally slower, but with an estimated maximum difference of 10% this should not be noticeable from the users point of view.IMO it would be worthwhile to test if a GCC4 build with optimizations will work. From what I recall, the GCC3 series was pretty much a lemon which gave many developers lots of grief; some versions would work, others would fail to correctly build projects. So there should be a good chance to get a "real" GCC4 Haiku build to work; I think that this would result in noticeable speedups.Christianp.s.: Benchmark download still coming up, have to integrate fix for a problem which just cropped up on Haiku/GCC4 & write docs.
One other problem with the benchmark is that you didn't only use different compilers, but also different platforms. In another word, running a cygwin 2.95.3 build of your benchmark on Windows would be interesting, comparing cygwin 4 on Windows. Obviously, it would be a punch in the belly if a simple computational benchmark ran twice as fast on Windows compared Haiku, everything else being equal. But maybe the turned off optimizations in our GCC4 indeed account for the missing performance boost, then it could be low hanging fruit to get a boost for GCC4 Haiku in general. :-)
Best regards, -Stephan