New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mockito vs EasyMock performance #3288
Comments
We have had performance questions before, but those were focused on ByteBuddy. We didn't discuss the similar stack thus far. @raphw any immediate ideas as to where this discrepancy would come from? |
Have you tried removing the map and write three wxplicit benchmarks? |
Hi @raphw Yes, I created new benchmark that tested INLINE mock maker only:
Results:
|
One would need to dig down here, but I'd assume there's a volatile field involved or the like. I don't know the easy mock implenentation, but is it subclass based? |
Hi
I tried to compare the performance of latest versions of Mockito (5.10) and EasyMock (5.2). They use the same technology stack (ByteBuddy, ASM, Objenesis) so the results should be similar. I used the simplest interface for mocking - functional (Callable) and three different mock makers for Mockito (inline, sub-classing and proxy).
Here's configuration for testing:
Mockito benchmark:
Results:
EasyMock benchmark:
Results:
So you see that EasyMock shows 100x less average execution time. And that's very strange. Can you please check my benchmarks? Have I done something wrong? Or how can you explain that?
The text was updated successfully, but these errors were encountered: