Replies: 3 comments 8 replies
-
@brucelwl Before drawing firm conclusions, I would increase warmup and test iterations to make sure this is not just measuring initialization: Jackson 3.x does more initial processing I think, so initialization would take longer (although even then 4x would be bit unexpected). Generally I use runtime units of not iterations but seconds of runtime: warmup needs to be typically at least 3 seconds or so (I use 5), test time multiple seconds as well. Assuming this is corrected as necessary.... It would be good to know:
Benchmarks I have been using (https://github.com/FasterXML/jackson-benchmarks/) show 3.x results to be similar to 2.x although not better (with JDK 17), but not substantially worse in most cases PS. Also: I would first remove multi-threading for tests (threads=15) when isolating numbers, esp. for small number of iterations. This to get more stable baseline -- and only then try out higher thread counts to see if that matters. |
Beta Was this translation helpful? Give feedback.
-
@cowtowncoder This is UserInfo code, a very simple entity class, By the way, I would like to clarify that I am using Openjdk 25 import java.util.ArrayList;
import java.util.List;
public class UserInfo {
String username;
List<String> tags = new ArrayList<>();
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public List<String> getTags() {
return tags;
}
public void setTags(List<String> tags) {
this.tags = tags;
}
} |
Beta Was this translation helpful? Give feedback.
-
@cowtowncoder Jackson3 uses MethodHandle, which theoretically performs much faster than Jackson2 using reflection, but even if the performance is similar, it can still be difficult to get excited |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I conducted benchmark tests on Jackson3 and Jackson2 through JMH, but found that the performance of Jackson3 was much worse than that of Jackson2, which did not meet my expectations for Jackson3. I don't know if my test cases were unreasonable or if there are other reasons. Do you have a stress test report for Jackson3? Here is my test code
Beta Was this translation helpful? Give feedback.
All reactions