Git Product home page Git Product logo

Comments (7)

ddssff avatar ddssff commented on June 3, 2024 1

One more suggestion - use pattern matching and the maybe function instead of fromJust and isNothing.

from text-compression.

ddssff avatar ddssff commented on June 3, 2024

Also, I don't see much value in definitions like this:

emptySTRLESeq :: ST s (STRef s (Seq (Maybe b)))
emptySTRLESeq = newSTRef DS.empty

I would just replace uses of emptySTRLESeq with newSTRef DS.empty everywhere, and similarly for other functions. Furthermore, I don't think you need to encode the type in symbol names like brleseqstackempty - just call it stackRef, and rename brleseqstackemptyr just stack.

from text-compression.

Matthew-Mosior avatar Matthew-Mosior commented on June 3, 2024

@ddssff do you think we should move away from implementing via the ST monad right (replace with Writer monad)? If so a lot of these functions probably wont be necessary anymore. I still wonder about performance though, doesn't the ST monad allow for scoped mutation (should allow for a Haskellish way to maintain near C performance)? Maybe the current ST monad implementation isn't any faster than say implementing via the Writer monad (I like the Writer monad way much better).

from text-compression.

ddssff avatar ddssff commented on June 3, 2024

Honestly, I don't understand how the ST monad affects performance. I did the writer monad implementation by incrementally transforming the ST monad implementation, so first I had to do the work described in this ticket - parameterize the ByteString / Text type, inline trival functions and types, etc. Once that is done we can convert to Writer monad but keep the ST monad version. Then perhaps some benchmarking.

from text-compression.

ddssff avatar ddssff commented on June 3, 2024

My guess is that high performance is something you will have to do afterwards. But regular pure haskell does a pretty good job on its own.

from text-compression.

Matthew-Mosior avatar Matthew-Mosior commented on June 3, 2024

Sorry for the delay, will be looking into this soon.

from text-compression.

ddssff avatar ddssff commented on June 3, 2024

No problem, I've been very busy.

from text-compression.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.