title: Are immutable "lookup" arrays a good choice in a base encoding algorithm?
body: <p>context: I am making a haskell program that implements  base 2 4 8 16 32 64 and 128 encodings of ByteString terms, It could be used very often in network context so I want it to be as fast and reliable as possible.</p>
  
  <p>problem : My first implementation did encoding by performing recursive operations on each byte of data, this doesn't seem optimal at all to me so in my next try I wanted to use n dimensional arrays (maybe Judy arrays?) where each block of n Word8 terms is an index to its encoded version.
  example : in base 64 encoding, each block of 3 Word8 values are an index to 4 Word8 values.</p>
  
  <p>question: Is using immutable arrays in this context the best choice in regards to speed?</p>