Commit 83cd75a
committed
snappy: optimize UnalignedCopy64 and IncrementalCopy for RISC-V
Use RISC-V inline assembly (ld/sd) for 8-byte copy operations instead
of generic macro-based implementation.
Changes:
- UnalignedCopy64: direct ld/sd pair for 8-byte copy
- IncrementalCopy: 8-byte bulk copies when source/dest don't overlap
Performance improvement (direct function benchmark):
- Decompress compressible-256K: 728 MB/s -> 2205 MB/s (+203%)
- Decompress zeros-256K: 543 MB/s -> 1462 MB/s (+169%)
Tests: brpc_snappy_compress_unittest passed (7/7)
Signed-off-by: Felix-Gong <gongxiaofei24@iscas.ac.cn>1 parent eb31fa5 commit 83cd75a
2 files changed
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
167 | 177 | | |
168 | 178 | | |
169 | 179 | | |
| |||
173 | 183 | | |
174 | 184 | | |
175 | 185 | | |
| 186 | + | |
176 | 187 | | |
177 | 188 | | |
178 | 189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
100 | 123 | | |
101 | 124 | | |
102 | 125 | | |
| 126 | + | |
103 | 127 | | |
104 | 128 | | |
105 | 129 | | |
| |||
0 commit comments