Commit 63a83ad
authored
Optimize condition for removing written data in BufWriter (#415)
* Optimize condition for removing written data in BufWriter
Do it strategically, when:
- it can use a memcpy instead of memmove to remove it
- when no space left for new data
Signed-off-by: Jiahao XU <[email protected]>
* Fix typo
Signed-off-by: Jiahao XU <[email protected]>
* Replace multiplication with division
To prevent overflo
Signed-off-by: Jiahao XU <[email protected]>
* Update crates/async-compression/src/generic/write/buf_writer.rs
Signed-off-by: Jiahao XU <[email protected]>
* Do copyback at 512B flushed data
So that memmove AVX256 can be used to do the copyback,
which should be reasonably fast
Signed-off-by: Jiahao XU <[email protected]>
* Fix commit issues
Signed-off-by: Jiahao XU <[email protected]>
* Fix fmt
Signed-off-by: Jiahao XU <[email protected]>
---------
Signed-off-by: Jiahao XU <[email protected]>1 parent e894423 commit 63a83ad
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
140 | 146 | | |
141 | 147 | | |
142 | 148 | | |
| |||
0 commit comments