On 2/8/2014 2:11 PM, Dmitry Olshansky wrote:
09-Feb-2014 02:03, Walter Bright пишет:
On 2/7/2014 9:06 AM, Dmitry Olshansky wrote:
Why throwing a single exception is such a big problem?

Because in order to unwind the stack, you need to find the information
about the stack layout. This lookup is rather slow. You can make the
lookup faster by compromising the function code generation, but this is
considered an unacceptable tradeoff.

A special table lookup can't be slow compared to writing a dummy HTTP 500
response. Just saying. Yes, it's a tad slower then cmp + jz, I do understand 
that.

Again I'm trying to say that framing stack unwinding as the culprit of vibe.d
crawling under bad requests is plain wrong, and that was the focal point of the
original argument.

I don't know how vibe.d works, but my point is using exception handling to implement normal control flow is bad design and it is going to be slow and the reason it is slow is because of the table lookup and unwinding cost, and that is not going to be fixed.

Reply via email to