Skip to content

erantapaa/read-word32

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Benchmarking different ways of finding the last Word32 in a file
which matches a criterion.

See http://stackoverflow.com/questions/33758150/haskell-read-a-binary-file-backwards

Synopsis
===
    # create a 1 meg file of zeros
    dd if=/dev/zero bs=1m count=1 of=input-1m

    # create a 100 meg file of zeros
    dd if=/dev/zero bs=1m count=100 of=input-100m

    stack build                    # builds read-word32-exe

    time read-word32-exe v1 input-1m
    time read-word32-exe v2 input-1m
    time read-word32-exe v3 input-1m

    time read-word32-exe v1 input-100m
    time read-word32-exe v2 input-100m  # may not finish
    time read-word32-exe v3 input-100m

    # Create a 12M file of Word32s beginning with 0xC0

    read-word32-exe create input-12m 30000

About

examples of reading Word32s from a file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published