Numeric read seems too strict

David Feuer david.feuer at gmail.com
Sun Oct 2 03:34:34 UTC 2016


Instead of scanning first (in lexing) to find the end of the number and
then scanning the string again to calculate the number, start to calculate
once the first digit appears.

On Oct 1, 2016 10:07 PM, "wren romano" <winterkoninkje at gmail.com> wrote:

> On Mon, Sep 12, 2016 at 11:03 AM, David Feuer <david.feuer at gmail.com>
> wrote:
> > By the way, I believe we should be able to read numbers more efficiently
> by
> > parsing them directly instead of lexing first. We have to deal with
> > parentheses, white space, and signs uniformly for all number types. Then
> > specialized foldl'-style code *should* be able to parse integral and
> > fractional numbers faster than any lex-first scheme.
>
> I follow the part about parentheses and negations, but I'm not sure I
> get the rest of what you mean. E.g., I'm not sure how any parser could
> be faster than what bytestring-lexing does for Fractional and Integral
> types (ignoring the unoptimized hex and octal functions). What am I
> missing?
>
> --
> Live well,
> ~wren
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20161001/1a441aa6/attachment.html>


More information about the Libraries mailing list