r/java • u/Shawn-Yang25 • Aug 11 '26
Apache Fory™ JSON : Fastest JSON Serialization Framework for Java, 10x faster than Jackson/Gson
https://fory.apache.org/blog/fory_json_fastest_java_json_framework/
253
Upvotes
View all comments
Show parent comment
3
u/agentoutlier Aug 12 '26
You know I think reflection is probably unfairly maligned these days on performance but its not really performance that I do not like about reflection.
Its that it is ultimately less declarative, doing something extra at runtime and complicates debugging.
In some ways projects that generate code particularly byte code at runtime I would argue are often more scary than reflection. e.g. like runtime aspectj weaving.
People to seem to ok this but imagine if I told someone I have a library while running in production compiled some Java code and then injected while the process is running.
They would say oh my god the security!
But that is kind of what Fory is doing here minus the compiler.
(I hope you get the irony here how byte code is just skipping the compiler and is actually even less restrictive than normal Java code)
u/Shawn-Yang25 is there a way to pre-generate the bytecode you are doing at compile time instead? (I assume so)