[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2014-03-07 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=9584 --- Comment #26 from hst...@quickfur.ath.cx 2014-03-07 17:06:46 PST --- Hooray! Now I can feel comfortable about using exceptions in my code! Well technically speaking, it shouldn't really matter that much since exceptions are, well, exceptiona

[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2014-03-06 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=9584 Jonathan M Davis changed: What|Removed |Added Status|NEW |RESOLVED Resolution|

[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2014-02-20 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=9584 --- Comment #24 from Adam D. Ruppe 2014-02-20 13:59:42 PST --- The pull request was just merged with my new code for linux, and windows already had improved code. Jonathan, can you confirm the new version is better on your computer too and c

[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2014-02-08 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=9584 --- Comment #23 from Adam D. Ruppe 2014-02-08 15:23:19 PST --- (In reply to comment #21) > Have you tried to run the D&Java benchmark attached to this Issue 9584 ? I didn't run these specifically, I just did the try/catch Jonathan wrote. Let

[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2014-02-08 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=9584 --- Comment #22 from bearophile_h...@eml.cc 2014-02-08 15:00:14 PST --- (In reply to comment #21) > Have you tried to run the D&Java benchmark attached to this Issue 9584 ? Sorry, please ignore this question. I have just read pull 717 and I'v

[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2014-02-08 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=9584 --- Comment #21 from bearophile_h...@eml.cc 2014-02-08 14:56:55 PST --- (In reply to comment #19) > I did the change in a pr for easier testing: > > https://github.com/D-Programming-Language/druntime/pull/717 Have you tried to run the D&Java

[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2014-02-07 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=9584 --- Comment #20 from Adam D. Ruppe 2014-02-07 20:10:53 PST --- My pull request there is posix only. A win but not complete without looking at Windows too. And I'm not sure I understand the Windows stack trace code. There must be something la

[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2014-02-07 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=9584 --- Comment #19 from Adam D. Ruppe 2014-02-07 19:22:45 PST --- I did the change in a pr for easier testing: https://github.com/D-Programming-Language/druntime/pull/717 -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?ta

[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2014-02-07 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=9584 --- Comment #18 from Jonathan M Davis 2014-02-07 17:36:50 PST --- > Maybe we shouldn't do the stack trace on non-debug builds. Bad idea IMHO. Exceptions and their stack traces can still be logged in release builds, which can be useful when a

[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2014-02-07 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=9584 --- Comment #17 from hst...@quickfur.ath.cx 2014-02-07 17:26:18 PST --- Whoa. If this works out well, D exceptions could finally beat Java's! -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are recei

[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2014-02-07 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=9584 Adam D. Ruppe changed: What|Removed |Added CC||destructiona...@gmail.com --- Comment

[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2014-02-07 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=9584 --- Comment #15 from Adam D. Ruppe 2014-02-07 17:02:32 PST --- I just played with this a little. Regular set up: ~ 270ms for the exception. Add Runtime.traceHandler = null;, then run, down to about ~7ms per exception. Then if I allocate th

[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2014-02-07 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=9584 --- Comment #14 from hst...@quickfur.ath.cx 2014-02-07 16:50:27 PST --- True, but at least we can lazily construct it as we unwind, so if the stack is 20 function calls deep and the catch block is only 5 functions up, then we defer constructing

[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2014-02-07 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=9584 --- Comment #13 from Sean Kelly 2014-02-07 16:06:57 PST --- (In reply to comment #12) > > But wouldn't that be trashed by the stack unwinding? I mean, if a catch block > makes function calls before looking at the trace, wouldn't that scrambl

[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2014-02-07 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=9584 --- Comment #12 from hst...@quickfur.ath.cx 2014-02-07 11:24:00 PST --- (In reply to comment #11) > I think traces could probably be done lazily. A pointer to the stack top is > available on throw, and all the code executed from that point sho

[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2014-02-07 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=9584 Sean Kelly changed: What|Removed |Added CC||s...@invisibleduck.org --- Comment #11 f

[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2013-12-24 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=9584 --- Comment #10 from bearophile_h...@eml.cc 2013-12-24 17:18:58 PST --- (In reply to comment #9) > As for returning the same exception instance if the rate of throws is too high I have run the little programs in the linked article, and I have

[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2013-12-24 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=9584 --- Comment #9 from hst...@quickfur.ath.cx 2013-12-24 11:58:33 PST --- (In reply to comment #8) > The situation is improved, now in my benchmarks D exceptions are about only > 2-2.5 times slower than Java exceptions. > > Further improvements i

[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2013-12-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=9584 --- Comment #8 from bearophile_h...@eml.cc 2013-12-22 04:11:58 PST --- The situation is improved, now in my benchmarks D exceptions are about only 2-2.5 times slower than Java exceptions. Further improvements in the GC or the optimizations lin

[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2013-02-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9584 --- Comment #7 from Jonathan M Davis 2013-02-27 01:12:16 PST --- > D does none. It's possible that this is what you're seeing. I can't yet tell > if there is a bug here or not. There's a bug in the sense that D's exception performance sucks.

[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2013-02-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9584 --- Comment #6 from Don 2013-02-27 01:04:08 PST --- Java does indeed do a lot of optimization of exceptions. http://www.javaspecialists.eu/archive/Issue187.html D does none. It's possible that this is what you're seeing. I can't yet tell if t

[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2013-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9584 --- Comment #5 from Jonathan M Davis 2013-02-25 10:34:29 PST --- > But even so, I'm a bit suspicious of that Java code. Is it really throwing an > exception? If it contains any exception handling optimisations at all, it > would optimize the t

[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2013-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9584 --- Comment #4 from bearophile_h...@eml.cc 2013-02-25 04:17:11 PST --- (In reply to comment #3) > I'm a bit suspicious of that Java code. Is it really throwing an > exception? If it contains any exception handling optimisations at all, it > wo

[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2013-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9584 --- Comment #3 from Don 2013-02-25 03:49:32 PST --- Exception handling is not intrinsically very slow. Basically there are two function calls per stack frame, each of which only executes a handful of instructions. All of the data that is access

[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2013-02-24 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9584 --- Comment #2 from bearophile_h...@eml.cc 2013-02-24 16:54:50 PST --- Created an attachment (id=1194) An old exception benchmark In the attach there is an old exception benchmark I have kept, it compares the same code in Java, C++, D, Python,

[Issue 9584] Exceptions in D are ludicrously slow (far worse than Java)

2013-02-24 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9584 bearophile_h...@eml.cc changed: What|Removed |Added CC||bearophile_h...@eml.cc --- Com