pointfreeco / swift-case-paths

🧰 Case paths extends the key path hierarchy to enum cases.
https://www.pointfree.co/collections/enums-and-structs/case-paths
MIT License
904 stars 105 forks source link

Add updated benchmarks #138

Closed stephencelis closed 8 months ago

stephencelis commented 8 months ago

Let's add updated benchmarks to get a better understanding of the performance of case key paths vs. reflection-based case paths.

While case key paths bring a number of improvements to case paths, including better ergonomics and the ability to utilize dynamic member lookup along enum cases, they are currently a bit slower than reflection-based case paths.

The performance of reflection-based case paths is the result of a long journey of improvements, so this shouldn't be super surprising, and case key paths are still plenty fast compared to earlier case paths.

These benchmarks will help us measure improvements to case key paths over time.