Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Exceptions are expensive and I hope no body uses it in the hot path (80%). The compiler has to inject a lot of code to unwind the stack that affects the cache. It is however not expensive for common operations (20%).

There are couple of threads in dforum that discusses this and to have throw attribute [1] and eventually making nothrow as default [2].

[1] https://forum.dlang.org/thread/sbdrybtyfkxfhxxjgqco@forum.dl...

[2] https://forum.dlang.org/post/qur0l0$2h8s$1@digitalmars.com



Why do you link to forum entries from dlang on a c++ exception topic? Is the implementation identical or at least somewhat similar?


D is evolved from a C++ compiler, and can - in principle, it's a question of priorities I believe, catch C++ exceptions




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: