tput improvements#13
Merged
Merged
Conversation
here's the output of running both the throughput_fast and throughput_slow files
```
aduffy@DuffyProBook /V/C/fsst (aduffy/improve-throughput)> cargo run --release --example throughput_fast
Finished `release` profile [optimized] target(s) in 0.03s
Running `target/release/examples/throughput_fast`
building a simple symbol table
building new text array of 1073741824 bytes
beginning compression benchmark...
test completed
compression ratio: 3.7142857172507413
wall time = 1.323992917s
tput: 810987589.2938784 bytes/sec
aduffy@DuffyProBook /V/C/fsst (aduffy/improve-throughput)> cargo run --release --example throughput_slow
Compiling fsst-rs v0.1.0 (/Volumes/Code/fsst)
Finished `release` profile [optimized] target(s) in 0.15s
Running `target/release/examples/throughput_slow`
building a simple symbol table
building new text array of 1073741824 bytes
beginning compression benchmark...
test completed
compression ratio: 0.5
wall time = 3.814265125s
tput: 281506866.6733019 bytes/sec
```
It seems like when we have a lot of escape codes, we're considerably (~4x) slower than when we have
a lot of code table hits. Need to dig into this.
This comment was marked as outdated.
This comment was marked as outdated.
a10y
commented
Aug 19, 2024
| // SAFETY: `end` will point just after the end of the `plaintext` slice. | ||
| let in_end = unsafe { in_ptr.byte_add(plaintext.len()) }; | ||
| let in_end_sub8 = unsafe { in_end.byte_sub(8) }; | ||
| let in_end_sub8 = in_end as usize - 8; |
Contributor
Author
There was a problem hiding this comment.
miri caught that the old thing was technically a dangling ptr.
i never dereferenced it but just to make it happy i work with it as an address instead of as a pointer
a10y
commented
Aug 20, 2024
| Self { | ||
| bytes: [value, 0, 0, 0, 0, 0, 0, 0], | ||
| } | ||
| Self { num: value as u64 } |
Contributor
Author
There was a problem hiding this comment.
this seems to compile to the same thing in all but debug mode (godbolt link) but probably just clearer this way anyway
Merged
a10y
pushed a commit
that referenced
this pull request
Aug 20, 2024
## 🤖 New release * `fsst-rs`: 0.1.0 -> 0.2.0 <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.2.0](v0.1.0...v0.2.0) - 2024-08-20 ### Other - tput improvements ([#13](#13)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/MarcoIeni/release-plz/). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Closed
a1412744807
added a commit
to a1412744807/rs-fsst
that referenced
this pull request
Oct 27, 2025
## 🤖 New release * `fsst-rs`: 0.1.0 -> 0.2.0 <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.2.0](spiraldb/fsst@v0.1.0...v0.2.0) - 2024-08-20 ### Other - tput improvements ([#13](spiraldb/fsst#13)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/MarcoIeni/release-plz/). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Goodbai-1206
added a commit
to Goodbai-1206/fsst-rs
that referenced
this pull request
Oct 29, 2025
## 🤖 New release * `fsst-rs`: 0.1.0 -> 0.2.0 <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.2.0](spiraldb/fsst@v0.1.0...v0.2.0) - 2024-08-20 ### Other - tput improvements ([#13](spiraldb/fsst#13)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/MarcoIeni/release-plz/). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
akkjs887
added a commit
to akkjs887/rt-rsst
that referenced
this pull request
Oct 29, 2025
## 🤖 New release * `fsst-rs`: 0.1.0 -> 0.2.0 <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.2.0](spiraldb/fsst@v0.1.0...v0.2.0) - 2024-08-20 ### Other - tput improvements ([#13](spiraldb/fsst#13)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/MarcoIeni/release-plz/). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
yelirekhmon
added a commit
to yelirekhmon/fstrs
that referenced
this pull request
Oct 30, 2025
## 🤖 New release * `fsst-rs`: 0.1.0 -> 0.2.0 <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.2.0](spiraldb/fsst@v0.1.0...v0.2.0) - 2024-08-20 ### Other - tput improvements ([#13](spiraldb/fsst#13)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/MarcoIeni/release-plz/). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improvements in throughput and allocations
find_longest_symbolstuff and rewrotecompress_countto just usecompress, 5x speedup for the train benchmarkvec![Symbol::EMPTY; N]withvec![0u64; N]and then transmuting, savingNcalls toSymbol.cloneand replacing 2D with 1D vector (allows us to use thevec!specialization for creating a vector of all zeros)