[Haskell-cafe] Lack of inlining -> slow parsing with Data.Binary
Thomas Schilling
nominolo at googlemail.com
Tue Dec 30 16:21:02 EST 2008
Which version of binary did you use? There were similar problems a
while ago, but, IIRC, they're supposed to be fixed (apparently too
*many* INLINE pragmas were the problem).
2008/12/26 Eugene Kirpichov <ekirpichov at gmail.com>:
> Hi,
>
> I'm parsing Java classfiles with Data.Binary, the code is here:
> http://paste.org/index.php?id=4625
>
> The problem is that the resulting code parses rt.jar from JDK6 (about
> 15K classes, 47Mb zipped) in 15 seconds (run the program with main
> -mclose rt.jar, for instance), which is 10 times slower than my Java
> version of the same code.
>
> I compile the program with -O2 ; I tried -ddump-inlinings and it turns
> out that my readByte/readWord16/readWord32 functions don't get
> inlined, despite being simply aliases for 'get::Get WordXX'; so, in
> places where my Java version does a pointer access (after being
> JIT-compiled), the Haskell version does two function calls.
>
> What can be the reason of this lack of inlining? Or how do I
> understand the output of -ddump-inlinings?
>
> --
> Eugene Kirpichov
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
--
Push the envelope. Watch it bend.
More information about the Haskell-Cafe
mailing list