[Issue 11810] std.stdio.byLine/readln performance is very bad

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Apr 10 08:51:02 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=11810

--- Comment #8 from Nick Treleaven <ntrel-public at yahoo.co.uk> ---
Here's as far as I got:
https://github.com/ntrel/phobos/commits/byLine-fast

This is faster than standard byLine on my Windows box iff std.utf.validate is
not called for each line. To be honest, I'm not sure whether std.stdio.readln
is doing UTF validation or not. readln has different implementations so
performance of standard byLine varies by platform.

I'm not sure whether this would be accepted as a PR. One issue is that when
using stdin you couldn't input just one line at a time anymore.

--


More information about the Digitalmars-d-bugs mailing list