February 09, 2014 Re: vibe.d & exception performance | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jakob Ovrum | On Sunday, 9 February 2014 at 16:12:30 UTC, Jakob Ovrum wrote:
> On Sunday, 9 February 2014 at 16:07:52 UTC, Marc Schütz wrote:
>> But the difference actual difference is so much larger. Where does it come from? It might mean that there is some costly operation that both `new` and `toString()` perform. Or it might actually be a bug, and when fixed, would have worse performance. It seems almost too good to be true...
>
> They both allocate GC memory, which can cause a collection cycle. Could that be it?
No, I just checked this by allocating another exception in addition to the one being thrown, and it made no difference.
But I think I've found the explanation, see my previous post.
|
February 26, 2014 Re: vibe.d & exception performance | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marc Schütz | > The results:
>
> A) vibe.d 0.7.17 B) vibe.d patched
> 1) no exceptions 13000 req/s 13000 req/s
> 2) dynamic exceptions 200 req/s 800 req/s
> 3) static exceptions 320 req/s 19000 req/s
New numbers with DMD/Druntime/Phobos git (includes the patch by Adam Ruppe):
A) vibe.d 0.7.17 B) vibe.d patched
1) no exceptions 15000 req/s 16000 req/s
2) dynamic exceptions 120 req/s 19000 req/s
3) static exceptions 120 req/s 19000 req/s
Dynamic and static exceptions are now equally fast, provided `toString()` is not called on them.
|
Copyright © 1999-2021 by the D Language Foundation