f4b6a3 / uuid-creator

UUID Creator is a Java library for generating Universally Unique Identifiers.
MIT License
432 stars 44 forks source link

add fast ulid creator in benchmark #7

Closed nimo23 closed 4 years ago

nimo23 commented 4 years ago

The ulid-creator has

UlidCreator.getFastUlid()

coming from

UuidCreator.getUlidBasedCreator().withFastRandomGenerator().create().toString().

Could you add the fast ulid creator in this benchmark?

Throughput.UuidCreator_FastUlidBasedGuid
AverageTime.UuidCreator_FastUlidBasedGuid
fabiolimace commented 4 years ago

The thoughput difference is very small between the methods UlidCreator.getUlid() and UlidCreator.getFastUlid(). I think these methods spend more time incrementing the internal counter than calling the method Random.getLong(). So I decided not to include this method in the benchmark.

I'll think about this and the other issues you opened.

fabiolimace commented 4 years ago

I will do some changes in the ulid-creator project before releasing a minor version.

After that I'll include both in the benchmark project: https://github.com/fabiolimace/uuid-creator-benchmark

And then rename this project to id-creator-benchmark to be more generic.

nimo23 commented 4 years ago

Ok. Thanks!