On 8/23/2014 3:20 PM, Walter Bright via Digitalmars-d wrote:
On 8/23/2014 12:00 PM, Brad Roberts via Digitalmars-d wrote:
On 8/23/2014 10:46 AM, Walter Bright via Digitalmars-d wrote:
I feel that non-UTF encodings should be handled by adapter algorithms,
not embedded into the JSON lexer, so yes, I'd drop that.

For performance purposes, determining encoding during lexing is useful.

I'm not convinced that using an adapter algorithm won't be just as fast.

Consider your own talks on optimizing the existing dmd lexer. In those talks you've talked about the evils of additional processing on every byte. That's what you're talking about here. While it's possible that the inliner and other optimizer steps might be able to integrate the two phases and remove some overhead, I'll believe it when I see the resulting assembly code.

Reply via email to