CramBL / mtgo-collection-manager

App for managing a card collection on Magic Online
GNU General Public License v3.0
0 stars 0 forks source link

Small improvements to MTGO Parser #84

Closed CramBL closed 11 months ago

CramBL commented 11 months ago

Conclusion

Simply marking the happy path [[likely]] and error branches [[unlikely]] resulted in 10% fewer missed branches on a full collection parse (which includes hitting a few unlikely branches e.g. special handling of MTGO ID == 1).

Full parse of a collection of around 3k unique cards on an 8 year old ThinkPad (3rd gen) running Lubuntu 22.04.

LLVM Before 73-85 ms

The branch misses were consistently above 310k. The range was approx. 310-325k misses (~0.33%)

LLVM After 70-73 ms

The branch misses are consistent below 310k in the same scenario as above. The range is now 300-310k misses (~0.32%).

GCC Before 65-70 ms

Approx. 330-350k misses (~0.44%)

GCC After 65-66 ms

Approx. 290-300k misses (~0.40%)