News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

Question to Pelle

Started by Kempelen, April 16, 2008, 10:18:13 PM

Previous topic - Next topic

Kempelen

Hi Pelle,
I am writting a program where speed is a priority. I have two questions, as the answers are not in the documentation:
- If I put 'try' and 'except' in my code, does the code inside suffer a speed penalty?
- When compile and link with debug options on, does it affect to speed of execution?

And talking of another think, if you have read my entry in the 'bug report' forum, you will see a problem. I have reproducced the code in a very small program. If you are interesting I can prepare a clean example and send you the problem an the description. if you are interesting let me know and I will send you by private message.

Regards, and thx.
FS

severach

All of the answers are in the debugger. Run to a breakpoint placed near the code in question, right click, and show assembly. You'll see the instructions for try except and any added code due to debug.

Pelle

Quote from: Kempelen on April 16, 2008, 10:18:13 PM
- If I put 'try' and 'except' in my code, does the code inside suffer a speed penalty?
Usually yes. Less so on X64 and ARM, more so on X86.

Quote from: Kempelen on April 16, 2008, 10:18:13 PM
- When compile and link with debug options on, does it affect to speed of execution?
Not much, if you keep optimizations on (but then again, debug builds are for catching bugs and not necessarily producing the fastest executables).

Quote from: Kempelen on April 16, 2008, 10:18:13 PM
And talking of another think, if you have read my entry in the 'bug report' forum, you will see a problem. I have reproducced the code in a very small program. If you are interesting I can prepare a clean example and send you the problem an the description. if you are interesting let me know and I will send you by private message.
Yes, a small example would be helpful. Please mail me...
/Pelle