digitalmars.D - slow exceptions
- Ant (11/11) Nov 23 2004 I've heard people complaining about exception on windows.
- Sean Kelly (9/10) Nov 23 2004 The current Win32 exception code sacrifices speed for size, but there's ...
- Walter (10/19) Nov 23 2004 be
- Simon Buchan (5/28) Nov 23 2004 You mean D uses Windows exception handling on other platforms too?
- Walter (6/36) Nov 23 2004 explicitly
I've heard people complaining about exception on windows. here is an exert from the Qu language http://centrin.net.id/~marc/ (Obviously the guy doesn't speak my native language): The most noticeable difference is how Qu handle exceptions. Qu appears to be fast because it does not create exception instances until you explicitly call a builtin function. When an exception is thrown, it is simply recorded in the associated Thread object. The idea is that exceptions are (and should be) extensively used so throwing an exception must be done as fast as possible. I don't know what he is talking about but if I did it would make sense to me. Ant
Nov 23 2004
In article <co07jc$1ti0$1 digitaldaemon.com>, Ant says...I've heard people complaining about exception on windows.The current Win32 exception code sacrifices speed for size, but there's no reason it can't be optimized--it doesn't have to be any slower to throw an exception than it would be unroll the stack normally to the same point. Still, I suspect this sort of performance tuning is low on Walter's list of priorities. There is a bug in this area however (auto class destructors aren't called when they go out of scope from a thrown exception), so perhaps it will get attention sooner than later. Sean
Nov 23 2004
"Ant" <Ant_member pathlink.com> wrote in message news:co07jc$1ti0$1 digitaldaemon.com...I've heard people complaining about exception on windows. here is an exert from the Qu language http://centrin.net.id/~marc/ (Obviously the guy doesn't speak my native language): The most noticeable difference is how Qu handle exceptions. Qu appears tobefast because it does not create exception instances until you explicitlycall abuiltin function. When an exception is thrown, it is simply recorded intheassociated Thread object. The idea is that exceptions are (and should be) extensively used so throwing an exception must be done as fast aspossible. Exceptions should be exceptional, not the normal, case, and so if they're slow it should not matter. In any case, D needs to tie into the Windows system exception handling setup, since it is a systems language. That pretty much dictates how it is to be done.
Nov 23 2004
On Tue, 23 Nov 2004 14:43:05 -0800, Walter <newshound digitalmars.com> wrote:"Ant" <Ant_member pathlink.com> wrote in message news:co07jc$1ti0$1 digitaldaemon.com...You mean D uses Windows exception handling on other platforms too? -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/I've heard people complaining about exception on windows. here is an exert from the Qu language http://centrin.net.id/~marc/ (Obviously the guy doesn't speak my native language): The most noticeable difference is how Qu handle exceptions. Qu appears tobefast because it does not create exception instances until you explicitlycall abuiltin function. When an exception is thrown, it is simply recorded intheassociated Thread object. The idea is that exceptions are (and should be) extensively used so throwing an exception must be done as fast aspossible. Exceptions should be exceptional, not the normal, case, and so if they're slow it should not matter. In any case, D needs to tie into the Windows system exception handling setup, since it is a systems language. That pretty much dictates how it is to be done.
Nov 23 2004
"Simon Buchan" <currently no.where> wrote in message news:opshyc13sijccy7t simon.homenet...On Tue, 23 Nov 2004 14:43:05 -0800, Walter <newshound digitalmars.com> wrote:explicitly"Ant" <Ant_member pathlink.com> wrote in message news:co07jc$1ti0$1 digitaldaemon.com...I've heard people complaining about exception on windows. here is an exert from the Qu language http://centrin.net.id/~marc/ (Obviously the guy doesn't speak my native language): The most noticeable difference is how Qu handle exceptions. Qu appears tobefast because it does not create exception instances until youthey'recall abuiltin function. When an exception is thrown, it is simply recorded intheassociated Thread object. The idea is that exceptions are (and should be) extensively used so throwing an exception must be done as fast aspossible. Exceptions should be exceptional, not the normal, case, and so ifNo, it uses Windows exception handling on Windows. On Linux, it does something else because there is no OS defined method for doing eh.slow it should not matter. In any case, D needs to tie into the Windows system exception handling setup, since it is a systems language. That pretty much dictates how it is to be done.You mean D uses Windows exception handling on other platforms too?
Nov 23 2004