Timeline for Try-catch speeding up my code?
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 20, 2012 at 11:00 | comment | added | OrangeDog | @WernerCD - Only if you write the assembly yourself | |
| Jan 19, 2012 at 22:43 | history | edited | Jeffrey Sax | CC BY-SA 3.0 |
Added example with generic method being slower on x86
|
| Jan 19, 2012 at 21:02 | comment | added | Jon Hanna | @WernerCD I'd say the fact that C and C++ has a keyword for suggesting that which (A) is ignored by many modern compilers and (B) it was decided not to put in C#, suggests that this isn't something we'll see in any more direct way. | |
| Jan 19, 2012 at 20:56 | comment | added | Jeffrey Sax | There are a number of reasons why this specific case may be different. Maybe it's the try-catch. Maybe it's the fact that the variables are re-used in an inner scope. Whatever the specific reason is, it's an implementation detail that you can't count on to be preserved even if the exact same code is called in a different program. | |
| Jan 19, 2012 at 19:13 | comment | added | WernerCD | With that being said... can you force different register allocation choices without using a Try/Catch? Either as a test for this hypothesis or as a general attempt to tweak for speed? | |
| Jan 19, 2012 at 18:27 | history | answered | Jeffrey Sax | CC BY-SA 3.0 |