Last active
August 25, 2017 10:22
-
-
Save abner/6e1f8ada411549207aebd83559016f91 to your computer and use it in GitHub Desktop.
UUID GENERATION
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.abner.vertx.errors; | |
import java.util.UUID; | |
import org.junit.Test; | |
import com.fasterxml.jackson.annotation.ObjectIdGenerators.UUIDGenerator; | |
import io.vertx.core.json.JsonObject; | |
public class UUIDTest { | |
@Test | |
public void test() { | |
JsonObject t = new JsonObject(); | |
UUIDGenerator gen = new UUIDGenerator(); | |
for (int i = 0; i < 10000000; i++) { | |
UUID uuid = gen.generateId(t); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
in my laptop, 10 Mi in 4.1 seconds.
Pretty fast!
And i was just afraid it would be slow.