-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
Generic Performance of JavaMoney is really poor. #320
Comments
There is a lot of places for improvement here but I guess it will be better to fix all bugs and implement needed features first. |
Thanks for those performance reports. If you're happy to contribute them we would appreciate integrating them (here or other JSR 354 deliverables require a JCP membership, in most other places of the wider JavaMoney community this should not be necessary) Note, while updating reports maybe also improvements to classes like FastMoney are certainly possible, the RI Moneta is a free of charge Open Source implementation much like Glassfish for Java EE or Jakarta EE. It does not aim at Real Time Performance or trading, you would require at least a special JVM environment using Java Realtime JSRs or other frameworks like Javolution and possibly a dedicated improved implementation of JSR 354. |
Feel free to do whatever you need with them. They are really simple ones. I can run some profiling with Jprofiler or other tools to see, which operation consume more resources than it needed to. |
Ok thanks, but note, this is not relevant for the MR1 which we plan to release before the end of the year (or whenever the newly elected JCP EC can vote) but for a follow-up JSR or service releases of Moneta as well as accompanying tools. |
Btw, it would be interesting to also compare Moneta to JodaMoney although that seems a bit unmaintained with the last change over 6 months ago, but at least some projects (mostly academic or PoC though it seems) use it and it is probably the only other Java library with a few similar goals. |
What do you think of switching from BigDecimal to something like Decimal4j https://github.com/tools4j/decimal4j?files=1 I don’t know the library very well but it might be faster than BigDecimal and supports up to 18 decimal points if this kind of precision is required |
That's certainly not in scope for the upcoming MR1. We could think of something like extending the "pluggable" type system (with the |
Hi,
I've wrote simple JMH Benchmark, where i do some basic mathematical operations such as Sum, Subtraction, multiply.
As a baseline comparison, I have used Long & BigDecimal.
As is it obvious from result JavaMoney is really slow. Autors claiming, that FastMoney is faster then Money, which is correct, but their perf. test was made of combination of several operations and isn't clear which one is slowest. Moreover simple getNumber take way too long time. As of now, current implementation isn't usable with larger data and multiple operation over them.
The bigger number in column score = better performance.
Test can be downloaded/cloned from: JMH Benchmark jsr354
SUM (ADD)
SUB
Multiply
Not reliable test from jsr354 docs.
Link to Not reliable test
The text was updated successfully, but these errors were encountered: