/haskell-kattis-survival-kit

Contains some dirty code to make Haskell work for code challenges where fast IO is key

Primary LanguageHaskell

About

These are some simple dirty files for fast IO in Haskell. Note that this is not supposed to be used for anything too serious. It simply exists to read large amounts of data quickly for programming competition style problems.

No emphasis are put on safety what so ever.

How to use

To compile you will simply need to add the ‘io.c’ file when compiling:

ghc Main.hs io.c

Todo

  • [ ] Rewrite bytestring reader, to read giant buffer (Use GHC.IO.Decide.RawIO with FD (file descriptor)) or Sysmtm.Posix.Internals use nonblocks (
  • [ ] Make Bystering parser (Buffer + offset)
  • [ ] Matrix or vector vector thingies
  • [ ] Benchmark number conversions
  • [ ] Hashable / Hashmap
  • [ ] Ouput