Skip to content

Instantly share code, notes, and snippets.

@vyazelenko
Created October 28, 2013 21:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vyazelenko/7204728 to your computer and use it in GitHub Desktop.
Save vyazelenko/7204728 to your computer and use it in GitHub Desktop.
Copy benchmark sample
@GenerateMicroBenchmark
public Object copyFieldByFieldGetFieldsEveryTime() {
return FieldsCopy.INSTANCE.copy();
}
@GenerateMicroBenchmark
public Object copyFieldByFieldUseCacheFields() {
return CachedFieldsCopy.INSTANCE.copy();
}
@GenerateMicroBenchmark
public Object copyByClone() {
return CloneCopy.INSTANCE.copy();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment