[cvs-nhc98] patch applied (hat): Add a new faster implementation of
input I/O.
Malcolm Wallace
Malcolm.Wallace at cs.york.ac.uk
Tue Oct 10 07:01:01 EDT 2006
Tue Feb 13 06:12:18 PST 2001 malcolm
* Add a new faster implementation of input I/O.
* There is a new bytecode instruction HGETS, and a new primitive
Builtin.hgets that uses it.
* The compiler recognises a special symbol _hGetStr and generates
the new bytecode HGETS for it.
* IO.hGetContents uses the special symbol _hGetStr, and hence the
new bytecode.
We achieve a 1.5x to 3x speed-up for raw lazy input. Unless a real
program is very heavily input-bound, this won't give a vast saving,
but for instance nhc98 is now 2.5% faster at building itself.
Note: because the bytecodes have changed, this commit is a BREAKING
change. You cannot mix old compiled code with new compiled code.
M ./src/compiler98/GcodeLow.hs -1 +2
M ./src/compiler98/Prim.hs +2
M ./src/compiler98/PrimCode.hs +3
More information about the Cvs-nhc98
mailing list