4 ms·
It doesn't have to be a full project, right? Do random drive-by PR-requests to open-source projects count? A few months ago I ended up scratching an optimisati
by vanderZwan 9y ago
It doesn't have to be a full project, right? Do random drive-by PR-requests to open-source projects count?
A few months ago I ended up scratching an optimisation itch for weeks, trying to figure out ways to make the lz-string[0][1] library faster and smaller. Near the end I went a bit nuts with trying out what works, methinks (nested trees built out of arrays and such), but I had a lot of fun.
It's not even my library, nor did my PR request get accepted/rejected yet. It did however make the compression up to 2x to 10x faster, depending on how well the data compresses.
And hey, I now have an intuitive understanding of LZ compression that I never thought I'd have!
Since a few days I've been working on writing a component for idyll[2] that lets you embed p5js sketches[3]. Progress here[4][5].
[0] http://pieroxy.net/blog/pages/lz-string/index.html http://pieroxy.net/blog/pages/lz-string/index.html
[1] https://github.com/pieroxy/lz-string/pull/98 https://github.com/pieroxy/lz-string/pull/98
[2] https://idyll-lang.github.io/ https://idyll-lang.github.io/
[3] https://p5js.org/ https://p5js.org/
[4] https://github.com/idyll-lang/idyll/issues/117 https://github.com/idyll-lang/idyll/issues/117
[5] https://jobleonard.github.io/idyll-p5/ https://jobleonard.github.io/idyll-p5/
- ovrdrv3 9y agoDo you like the coding train[1]? [1] https://www.youtube.com/user/shiffman https://www.youtube.com/user/shiffman
- vanderZwan 9y agoI have commented many a time on Shiffman's twitter that we need more gifs of him dancing, so yes :)
- exikyut 9y agoInteresting. I need to do some deep diving on LZ myself, to build a highly-compressible custom file format. Would benchmarks from a really old laptop be useful for #98 ?
- vanderZwan 9y agoProbably, because it's trying to be backwards compatible. LZ is really elegant once it clicks, and Pieroxy's approach of growing token size with alphabet is a very neat solution to the problem of the unicode alphabet being huge
- exikyut 9y agoStaring into space can occasionally be useful: I just remembered that I nearly forgot about this. I just replied (as you may have already noticed). Thanks for the info. I'm not quite sure how much investigation I'll need to do, but I can see alphabet-based token sizing being very useful for pure string compression, yeah. XZ seems to be a really flexible format but, unless I'm mistaken, it seems that implementations (such as the `xz` utility) seem to lean toward "one size fits all" instead of packing in+maintaining a "batteries included" basic (or maybe even extended) set of transformations/optimizations. It's kinda sad.