Repository navigation
Commit b3e72c2
committed
Add INLINE/INLINABLE pragmas to primitive put, Maybe/Either put, Arg, and Ratio
Add INLINE put to (), Proxy, Bool, Ordering, Word8..64, Int8..64, Word,
Int, Maybe, Either, and Semigroup.Arg (plus INLINE get on Arg), and
INLINABLE put/get with strict (pure $!) on Ratio.
Object size (GHC 9.10.3 -O2):
- Pcap.o: 517,432 B -> 526,792 B (+9,360 B, +1.8%)
- Wasm.o: 2,470,592 B -> 2,466,440 B (-4,152 B, -0.2%)
- Get Main.o: 515,976 B -> 520,264 B (+4,288 B, +0.8%, Ratio specialization)
- Put Main.o: 228,008 B -> 228,008 B ( 0 B, 0.0%)
- Data/Binary/Class.o: 764,888 B -> 767,424 B (+2,536 B, +0.3%)
Benchmarks (GHC 9.10.3, 10k elements, +RTS -T):
- Put [Either Int Word32]: 342 us (3.4 MB) -> 251 us (2.7 MB) (-27%, -21% alloc)
- Get [Ratio Int]: 1.60 ms (9.2 MB) -> 1.14 ms (6.4 MB) (-29%, -30% alloc)
- Put [Ratio Int]: 512 us (4.9 MB) -> 491 us (4.9 MB) (-4%)
- Put [Maybe Word32]: 145 us (1.7 MB) -> 145 us (1.7 MB) (same)
- pcap/generic/encode: 358 us (3.8 MB) -> 170 us (2.1 MB) (-53%, 2.1x faster, -45% alloc)
Add Semigroup.Arg Int Word16 roundtrip tests to tests/QC.hs (232/232
QC properties passing).
Assisted-By: Antigravity (Gemini 4)1 parent 463ade0 commit b3e72c2
2 files changed
Lines changed: 22 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| 219 | + | |
219 | 220 | | |
220 | 221 | | |
221 | 222 | | |
222 | 223 | | |
223 | 224 | | |
| 225 | + | |
224 | 226 | | |
225 | 227 | | |
226 | 228 | | |
227 | 229 | | |
228 | 230 | | |
229 | 231 | | |
| 232 | + | |
230 | 233 | | |
231 | 234 | | |
232 | 235 | | |
| |||
237 | 240 | | |
238 | 241 | | |
239 | 242 | | |
| 243 | + | |
240 | 244 | | |
241 | 245 | | |
242 | 246 | | |
| |||
251 | 255 | | |
252 | 256 | | |
253 | 257 | | |
| 258 | + | |
254 | 259 | | |
255 | 260 | | |
256 | 261 | | |
| |||
263 | 268 | | |
264 | 269 | | |
265 | 270 | | |
| 271 | + | |
266 | 272 | | |
267 | 273 | | |
268 | 274 | | |
| |||
275 | 281 | | |
276 | 282 | | |
277 | 283 | | |
| 284 | + | |
278 | 285 | | |
279 | 286 | | |
280 | 287 | | |
| |||
287 | 294 | | |
288 | 295 | | |
289 | 296 | | |
| 297 | + | |
290 | 298 | | |
291 | 299 | | |
292 | 300 | | |
| |||
299 | 307 | | |
300 | 308 | | |
301 | 309 | | |
| 310 | + | |
302 | 311 | | |
303 | 312 | | |
304 | 313 | | |
| |||
311 | 320 | | |
312 | 321 | | |
313 | 322 | | |
| 323 | + | |
314 | 324 | | |
315 | 325 | | |
316 | 326 | | |
| |||
323 | 333 | | |
324 | 334 | | |
325 | 335 | | |
| 336 | + | |
326 | 337 | | |
327 | 338 | | |
328 | 339 | | |
| |||
335 | 346 | | |
336 | 347 | | |
337 | 348 | | |
| 349 | + | |
338 | 350 | | |
339 | 351 | | |
340 | 352 | | |
| |||
349 | 361 | | |
350 | 362 | | |
351 | 363 | | |
| 364 | + | |
352 | 365 | | |
353 | 366 | | |
354 | 367 | | |
| |||
361 | 374 | | |
362 | 375 | | |
363 | 376 | | |
| 377 | + | |
364 | 378 | | |
365 | 379 | | |
366 | 380 | | |
| |||
558 | 572 | | |
559 | 573 | | |
560 | 574 | | |
| 575 | + | |
561 | 576 | | |
| 577 | + | |
562 | 578 | | |
563 | 579 | | |
564 | 580 | | |
565 | | - | |
| 581 | + | |
566 | 582 | | |
567 | 583 | | |
568 | 584 | | |
| |||
707 | 723 | | |
708 | 724 | | |
709 | 725 | | |
| 726 | + | |
710 | 727 | | |
711 | 728 | | |
712 | 729 | | |
| |||
718 | 735 | | |
719 | 736 | | |
720 | 737 | | |
| 738 | + | |
721 | 739 | | |
722 | 740 | | |
723 | 741 | | |
| |||
961 | 979 | | |
962 | 980 | | |
963 | 981 | | |
| 982 | + | |
964 | 983 | | |
| 984 | + | |
965 | 985 | | |
966 | 986 | | |
967 | 987 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1477 | 1477 | | |
1478 | 1478 | | |
1479 | 1479 | | |
| 1480 | + | |
1480 | 1481 | | |
1481 | 1482 | | |
1482 | 1483 | | |
| |||
0 commit comments