Closed fabiolimace closed 1 year ago
Implemented the new parser.
The new parser, used by new GUID(string)
, is almost twice as fast as UUID.fromString(string)
.
It is also as fast as StringCodec.INSTANCE.decode(string)
.
Benchmark results:
Benchmark Mode Cnt Score Error Units
GUID_parse thrpt 5 18015,522 ± 2205,740 ops/ms
StringCodec_decode thrpt 5 18109,898 ± 3952,417 ops/ms
UUID_fromString thrpt 5 9706,639 ± 1203,893 ops/ms
In addition, the regular expression dependency was removed from GUID.valid(string)
.
Released v5.3.2! 🎉
The new parser should be faster than
UUID.fromString(string)
.Also add a validation logic without regular expression.