SGCC vs. XGCC - speed?
Moderator: BigEvilCorporation
SGCC vs. XGCC - speed?
Is somebody did speed tests of these compilers? I don't have XGCC installed and currently don't want to do this, so I'm interested if somebody already compared speed, or maybe want to do this (then we can decide which tests must be done and run it, I can take SGCC part).
I did compare speed
Mightymighty Missile was programmed in a very loopy/linear way, so, when I went from SGCC to GCC (with a lot of pain, defining Volatiles & stuff) my fps counter exploded!
I don't have precise values, and I don't know if it came from my programming method... But with -O 4 on GCC, vs SGCC, I won almost 100% speed on my main loop code
Yeah, was something like 64fps>100fps when removing all wait_vsync() stuff.
So yeah, SGCC is buggy and do not optimize at all stuff.
Mightymighty Missile was programmed in a very loopy/linear way, so, when I went from SGCC to GCC (with a lot of pain, defining Volatiles & stuff) my fps counter exploded!
I don't have precise values, and I don't know if it came from my programming method... But with -O 4 on GCC, vs SGCC, I won almost 100% speed on my main loop code
Yeah, was something like 64fps>100fps when removing all wait_vsync() stuff.
So yeah, SGCC is buggy and do not optimize at all stuff.
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
By SGCC, you mean the very light exe suite to compile some md stuff, right? The one without any .ld.
Was my fav and first compilator... very easy to install and crazy easy to use !
Well, kanedaFR can tell you all the bugs we could find... Most of them are scary...
I remember lot of bugs around pointers, random memory glitches...
Also, some calculus, in some cases like myvalue=3+i; were failling because you had to write myvalue=3; myvalue=myvalue+i;
I also remember a glitches when using the & or | mask.
Another funny random glitch was the infamous "syntax error" when you were typing, lets say :
myvalue=3+myothervalue;
and you had to write :
myvalue= 3+myothervalue;
(adding a simple space fixed the problem).
Also, if you did while(1){}, it make crash the compilator
Add a very sloooooow compilation speed in big projects and poor error tracking and you're done! haha
Still my fav compilator... However, I can't use it anymore, too scary.
--------------
To move from SGCC to XGGG, its quite simple, but you must be sure to do this :
-Move all the $ into 0x in asm files
-Correct all the asm syntax to XGCC standard
-char stay char, word goes short, int goes short, long goes int < VERY important, in SGCC, int is 16bit).
- Add volatile on all your register-used pointers variables
And it's done
Good luck!
Was my fav and first compilator... very easy to install and crazy easy to use !
Well, kanedaFR can tell you all the bugs we could find... Most of them are scary...
I remember lot of bugs around pointers, random memory glitches...
Also, some calculus, in some cases like myvalue=3+i; were failling because you had to write myvalue=3; myvalue=myvalue+i;
I also remember a glitches when using the & or | mask.
Another funny random glitch was the infamous "syntax error" when you were typing, lets say :
myvalue=3+myothervalue;
and you had to write :
myvalue= 3+myothervalue;
(adding a simple space fixed the problem).
Also, if you did while(1){}, it make crash the compilator
Add a very sloooooow compilation speed in big projects and poor error tracking and you're done! haha
Still my fav compilator... However, I can't use it anymore, too scary.
--------------
To move from SGCC to XGGG, its quite simple, but you must be sure to do this :
-Move all the $ into 0x in asm files
-Correct all the asm syntax to XGCC standard
-char stay char, word goes short, int goes short, long goes int < VERY important, in SGCC, int is 16bit).
- Add volatile on all your register-used pointers variables
And it's done
Good luck!
Seems you speak about some different SGCC, maybe older version? One which I use (Sozobon C Compiler, release 3.0, which in Tools section of SpritesMind site) has no such bugs. I already wrote some thousands lines of code and not found any mentioned bugs, all works exactly as planned. Documentation states:
I don't think that all this was possible if it has bugs which you mentioned.The compiler has been tested with the "C Compiler Torture Test" from the Austin Code Works. This tests for full K&R compatibility. The compiler has been used to compile itself as well as many other programs totaling around 50,000 lines of code.
Maybe I had a older version... strange.
No, I was not dreaming, it has really some crazy bugs... Most of them are coming randomly on big project.
The bug that was happening systematically was the while(1){} one and the & and | thing. I don't remember the exact cases, sorry.
KanedaFR will confirm.
For me, going to SGCC to XGCC solved all my problems.
No, I was not dreaming, it has really some crazy bugs... Most of them are coming randomly on big project.
The bug that was happening systematically was the while(1){} one and the & and | thing. I don't remember the exact cases, sorry.
KanedaFR will confirm.
For me, going to SGCC to XGCC solved all my problems.
I placed while(1) {} into big project and indeed it freezes compiler. But this project uses a LOT of logical operations of all types (most of all code) and has no problems with it.Fonzie wrote:The bug that was happening systematically was the while(1){} one and the & and | thing. I don't remember the exact cases, sorry.
You scared me enough, so now I think about moving to XGCC too;)Fonzie wrote:For me, going to SGCC to XGCC solved all my problems.
How about GCC from Stef's Mini DevKit (bugs, optimization)? At least it installs easily and work fine, though it compile included example really slow and has much stuff which I don't need (because I already implemented it in my project). Seems if I choose that way, I must change init code to use it in my project..
Hi shiru,
About the long : 34 bit... its just a typo... its 32bit too
Well, I never installed XGCC, I just put the content in c:/xgcc and put the xgcc.bat in the c:/ root and its done
And to compile, you first execute c:/xgcc.bat and then c:/yourproject/compile.bat (without closing the window). There is a trick to avoid those things, but I only know it for windows98, not XP, sorry).
About Stef devkit, it is similar to XGCC, but you'll need to tweak it a bit to compile exactly what you want (well, it gave me this impression).
Good luck
Fonz
About the long : 34 bit... its just a typo... its 32bit too
Well, I never installed XGCC, I just put the content in c:/xgcc and put the xgcc.bat in the c:/ root and its done
And to compile, you first execute c:/xgcc.bat and then c:/yourproject/compile.bat (without closing the window). There is a trick to avoid those things, but I only know it for windows98, not XP, sorry).
About Stef devkit, it is similar to XGCC, but you'll need to tweak it a bit to compile exactly what you want (well, it gave me this impression).
Good luck
Fonz
I did fix some bugs but I would recommend going to GCC but if your not having any problems then don't switch.KanedaFr wrote:Paul Lee fixed some of these bugs I emailed him...
I don't remember if the version of my website is the last one....
There was a optimizer with Sozobon but I found that if you manually did the optimizing it was better so I never bothered with it.