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@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to