Comments (2)
Benchmark results before the changes:
Benchmark Mode Cnt Score Error Units
Throughput.compareTo thrpt 5 68817,326 ± 1647,961 ops/ms
Benchmark results after the changes:
Benchmark Mode Cnt Score Error Units
Throughput.compareTo thrpt 5 76785,167 ± 252,614 ops/ms (1.115785)
Benchmark code:
package benchmark;
import java.util.concurrent.TimeUnit;
import com.github.f4b6a3.ksuid.Ksuid;
import com.github.f4b6a3.ksuid.KsuidCreator;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Fork;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Threads;
import org.openjdk.jmh.annotations.Warmup;
@Fork(1)
@Threads(1)
@State(Scope.Benchmark)
@Warmup(iterations = 5, time = 1)
@Measurement(iterations = 5, time = 3)
@BenchmarkMode(Mode.Throughput)
@OutputTimeUnit(TimeUnit.MILLISECONDS)
public class Throughput {
Ksuid ksuid1 = new Ksuid(0, new byte[16]);
Kadui ksuid2 = new Ksuid(0, new byte[16]);
@Benchmark
public int compareTo() {
return ksuid1.compareTo(ksuid2);
}
}
from ksuid-creator.
Released v4.0.1
from ksuid-creator.
Related Issues (16)
- First version HOT 1
- implement monotonic KSUID HOT 1
- Version 3.0.0 HOT 2
- handle clock drift HOT 2
- Add support for RandomGenerator in Java 17 HOT 2
- Rewrite docs HOT 1
- Add a fast method to generate identifiers HOT 1
- Module name for Java 9+ HOT 1
- Add constructors in KsuidFactory for random generators HOT 1
- Sonatype Lift analysis report HOT 1
- Sonatype Lift analysis report HOT 1
- Add benchmark code to compare KSUID with UUID HOT 1
- Version 2.0.0 HOT 2
- Provide OSGI support HOT 2
- Optimize internal representation and comparison operation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ksuid-creator.