NO

Author Topic: Question to Pelle  (Read 4036 times)

Kempelen

  • Guest
Question to Pelle
« on: April 16, 2008, 10:18:13 PM »
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

  • Guest
Re: Question to Pelle
« Reply #1 on: April 17, 2008, 05:27:31 AM »
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.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Question to Pelle
« Reply #2 on: April 20, 2008, 04:17:25 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.

- 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).

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