|
|
Well, I made some research 2 years ago under os classic and had long
letters with Thorsten, who will maybe correct if I write some stupid
things. Or maybe add something useful to my post, I would be pleased.
At that time I tried again and again, even recompiling MacPov myself.
The conclusions were that CodeWarrior is decent, but not smart in code
generation (looking at the assembler of some small test files the 68k
code was crap, it works but uses your 68000 like a RISC making loads of
stupid things and not using your powerfuil instructions) so I suspect
similar pitfalls in PPC code, though my knowledge of that assembler is
zero. I know that it has powerful instructions which other compilers
don't have and so probably those don't get used well. But it's a guess.
MacmegaPov was always FAST.
Using MegaPov I got results aligned with the speed I think my mac has,
maybe sopme points slower but acceptable. Thorsten and me never got a
comparatively fast official CodeWarrior compile. I asked the authours of
megapov but never understood the up to 150% speed difference gap.
Now I got a G3, installed osX and was amazed about the speed of all
things, also I learned a lot about compilers, HW architecture, RISC,
pipelining and such stuff and so I had to try again some tests.
1. probaly the bench page is crap, the speeds there are just impossible
I think, remember that just a small variation in the anti-alias setting
can change things dramatically.
2. always remember to set "no verbose" and "don't display image", this
can gain sometimes a considerable speed, as incredible as it seems.
3. be aware of back ground processes that eat up CPU (use proc viewer or
top, I was astonished how much CPU an FTP can eat up)
so these were the premises.
Now the comparisons took place on the same g3 mac under osX. I used
MegaPov (based on 3.1) which is as always amazingly fast.
I then got the unix sources and compiled a command line version of
PovRay 3.1 using apple's compiler and comapred them to MegaPov. I used
the same settings and run the tests on the same conditions.
apple uses gcc 2.95 or something around there
My conclusions confirm voices, gcc is not very smart or anyway the PPC
backend is CRAP. I tried to optimize using every possible options, tried
permutations, anything which had sense or not. I got a significant
improvment over the original standard makefile settings but I was still
slower than MegaPov!!!
gcc has no particular optimizations for your processor, it makes PowerPC
generic code. This is incredibly stupid, the cache association, cache
size and the internal architecture of the processors changed
dramatically (and the G4 even more than my G2 and G3), even if G3 is
backward compatible.
Using processor settings under CodeWarrior gives a significant
difference. So I hope Apple will work on this to give us all a better
gcc.
I tired then another experimental thing. FLOAT operations should be
faster than DOUBLE and I wanted to try to compile pov in float and not
double. I tried this by changing the header one time and the other by
leaving the source unchanged and using the compiler flag "double as
float".
Unfortunately the pov-code has a pitfall somewhere and the language
parser corrupts, even using the compiler flag.
I am quite sure, even if I know nothing of pov internals, tha in many
places floats could be used instead of doubles speeding things up (this
would even give access to AltiVec) after all often the double precision
and range will not be used.
Ric
PS: I have not tried official MacPov on my G3 to compare, since I use
os X only.
In <3ce8b77a$1@news.povray.org> Adin wrote:
> Ok guys ... maybe you can help me.
> Shouldn't the mac be faster in any case ? Does anyone have any ideas
Post a reply to this message
|
|