Context
tests/Benchmark/CastorVsRamseyBench.php contains copy-paste errors that invalidate several benchmarks:
- Lines 142 and 148: Methods named
v6_generate_* call Version4::generate() instead of Version6::generate()
- Several Ramsey benchmarks call
uuid1() instead of the version-appropriate function
This means the library's performance claims against Ramsey\UUID cannot be verified or trusted, since the benchmarks for v6 are actually measuring v4 generation. If the library is positioned as a faster alternative, these results need to be accurate.
Proposal
Fix all benchmark methods to call the correct UUID version class:
- In
v6_generate_to_string_castor() and v6_generate_to_string_ramsey(): use Version6::generate() and Uuid::uuid6()
- Review all other version benchmarks (v1, v3, v5, v7) for similar copy-paste errors
- After fixing, run the benchmarks and publish representative results in the README or a
BENCHMARKS.md file
- Consider adding a CI check that verifies benchmark method names match the version they are testing (e.g., a naming convention lint)
Context
tests/Benchmark/CastorVsRamseyBench.phpcontains copy-paste errors that invalidate several benchmarks:v6_generate_*callVersion4::generate()instead ofVersion6::generate()uuid1()instead of the version-appropriate functionThis means the library's performance claims against Ramsey\UUID cannot be verified or trusted, since the benchmarks for v6 are actually measuring v4 generation. If the library is positioned as a faster alternative, these results need to be accurate.
Proposal
Fix all benchmark methods to call the correct UUID version class:
v6_generate_to_string_castor()andv6_generate_to_string_ramsey(): useVersion6::generate()andUuid::uuid6()BENCHMARKS.mdfile