Skip to content

Include benchmark tests using swift-benchmark #12

@NSStudent

Description

@NSStudent

I’d like to include benchmarks to measure the performance of critical operations in the bitboard system, such as calculating the index of the least/most significant bit (lsbIndex / msbIndex), since these are frequently used throughout the engine.

I plan to use Google’s swift-benchmark library, which is a lightweight and efficient solution for performance testing. It’s officially recommended in the Swift.org benchmarks article and is being used by the Point-Free team in their swift-parsing library, making it a solid reference for this task.

The goal of the benchmarks is to:
• Measure the performance of key functions like lsbIndex and msbIndex under different conditions.
• Establish a performance baseline for future bitboard optimizations.
• Validate that our De Bruijn-based implementation is as fast as expected.

I’ll add these benchmarks as part of a new test target, following the style used by Point-Free, with readable and comparable output.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions