[MLton-devel] Basis2002: IO

Matthew Fluet fluet@CS.Cornell.EDU
Sun, 27 Oct 2002 10:19:03 -0500 (EST)


> a vector into an array.  If I can produce a "native" readArr and readArrNB
> for Text (which shouldn't be too hard, it's just getting the types to work
> out; at worst, I'll just make another Posix _ffi that is cast with the
> right type), then I think we'll recover another big gain.

Just to check my hypothesis, I made a version of wc-input1 that uses
BinIO.  It does account for another decent improvement:

MLton0 -- mlton.cvs.basis-1997 
MLton1 -- mlton.cvs.basis-2002 
compile time
benchmark      MLton0 MLton1
wc-input1.text   1.13   1.53
wc-input1.bin    1.08   1.53
run time
benchmark      MLton0 MLton1
wc-input1.text  37.23  93.72
wc-input1.bin   41.12  64.37
run time ratio
benchmark      MLton1
wc-input1.text   2.52
wc-input1.bin    1.57

Interestingly, that also seems to account for the extra allocation going
on in basis-2002 for text input:

[fluet@lennon temp]$ ./wc-input1.text.basis-1997 @MLton gc-summary --
max semispace size(bytes): 8,007,680
max stack size(bytes): 256
GC time(ms): 0 (0.0%)
maxPause(ms): 0
number of copying GCs: 236
number of mark compact GCs: 0
number of LCs: 0
bytes allocated: 17,885,284
bytes copied: 274,120
bytes mark-compacted: 0
max bytes live: 5,280
[fluet@lennon temp]$ ./wc-input1.text.basis-2002 @MLton gc-summary --
max semispace size(bytes): 8,007,680
max stack size(bytes): 336
GC time(ms): 2,380 (0.9%)
maxPause(ms): 10
number of copying GCs: 54,764
number of mark compact GCs: 0
number of LCs: 0
bytes allocated: 4,063,032,156
bytes copied: 308,352,660
bytes mark-compacted: 0
max bytes live: 5,676
[fluet@lennon temp]$ ./wc-input1.bin.basis-1997 @MLton gc-summary --
max semispace size(bytes): 8,007,680
max stack size(bytes): 208
GC time(ms): 0 (0.0%)
maxPause(ms): 0
number of copying GCs: 236
number of mark compact GCs: 0
number of LCs: 0
bytes allocated: 17,885,164
bytes copied: 268,456
bytes mark-compacted: 0
max bytes live: 5,256
[fluet@lennon temp]$ ./wc-input1.bin.basis-2002 @MLton gc-summary --
max semispace size(bytes): 8,007,680
max stack size(bytes): 304
GC time(ms): 10 (0.0%)
maxPause(ms): 10
number of copying GCs: 238
number of mark compact GCs: 0
number of LCs: 0
bytes allocated: 18,218,264
bytes copied: 303,128
bytes mark-compacted: 0
max bytes live: 5,456




-------------------------------------------------------
This SF.net email is sponsored by: ApacheCon, November 18-21 in
Las Vegas (supported by COMDEX), the only Apache event to be
fully supported by the ASF. http://www.apachecon.com
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel