Commit a018cbe
authored
Implement compaction and embedded structs (#201)
GC compaction was introduced in Ruby 2.7.
Embedded Structs was introduced in Ruby 3.3. When enabled, the `struct
strscanner` is stored directly inside the object slot, meaning reading
the struct member doesn't require loading another memory region.1 parent 1d85632 commit a018cbe
2 files changed
Lines changed: 46 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
185 | 208 | | |
186 | 209 | | |
187 | 210 | | |
188 | 211 | | |
189 | | - | |
190 | | - | |
| 212 | + | |
| 213 | + | |
191 | 214 | | |
192 | 215 | | |
193 | 216 | | |
194 | 217 | | |
195 | 218 | | |
196 | 219 | | |
197 | 220 | | |
| 221 | + | |
198 | 222 | | |
| 223 | + | |
199 | 224 | | |
200 | 225 | | |
201 | 226 | | |
202 | 227 | | |
203 | 228 | | |
204 | | - | |
205 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
206 | 234 | | |
207 | | - | |
| 235 | + | |
| 236 | + | |
208 | 237 | | |
209 | 238 | | |
210 | 239 | | |
211 | 240 | | |
212 | 241 | | |
213 | | - | |
214 | | - | |
215 | | - | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
216 | 252 | | |
217 | 253 | | |
218 | 254 | | |
| |||
0 commit comments