Comments (7)
One more suggestion - use pattern matching and the maybe
function instead of fromJust and isNothing.
from text-compression.
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.
@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.
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.
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.
Sorry for the delay, will be looking into this soon.
from text-compression.
No problem, I've been very busy.
from text-compression.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from text-compression.