Comments (9)
Not sure what the issue is here. @n4s-linux can you please clarify? Is that ledger by default compiles with debug by default but shouldn't according to you?
from ledger.
Hi there. Yes, it turns out that with debug information compared to the optimized binary without debug info - it its 8 times faster.
So by compiling ledger without debugging, we are saving a lot of time.
It may not matter to most users, - but if You grow You book to 20k transactions, You will surely notice - it can take up to 800ms. The same book can be run without debugging in only 100ms.
from ledger.
Could be that changing to the debug
build flavor by default was done unintentional.
See https://github.com/ledger/ledger/blob/master/acprep#L234-L235, it seems the codelines date back to e0473e2 when John "[r]ewrote acprep in Python and improved the build".
If you build using ./acprep default
is the compiled ledger's speed acceptable for you, @n4s-linux?
from ledger.
that builds the slow version for me.
takes 1.138 seconds to run my book (23.4k postings)
whereas the optimized binary will only take 0.174 seconds.
which is ~6.5 times slower than my current binary.
i used acprep opt to get the fast version
from ledger.
After a quick investigation I think the performance improvements are mainly due to acprep setting NO_ASSERTS
(which I believe should be DISABLE_ASSERTS
as that is the option declared in CMakeLists.txt
, which then sets NO_ASSERTS
). Generally asserts could be useful in production code, yet the function implementing asserts is called debug_assert
(assert
is a macro), so its intended use is likely not for production.
from ledger.
To better understand your measurements, @n4s-linux, would you be willing to share how, i.e. with which commands, you measure performance and possible share your anonymised underlying dataset (e.g. ledger print --anon
)?
from ledger.
Sure thing.
Not sure if the book balances when it puts all the A's in front of the amount, i surely cant run that book
anon.txt
from ledger.
Thanks, @n4s-linux, and to get a better understanding how you measure performance, which commands do you run?
from ledger.
Note to self: Unless ledger is compiled with DISABLE_ASSERTS
tracing, which may slow down ledger, is still available (see ledger.hh.in:64
)
from ledger.
Related Issues (20)
- Account is `Equit` in `Equit:Opening Balances` HOT 1
- `Pure virtual function called!` in REPL mode with `bal --gain` followed by `bal`
- Support SIGNED debit and credit amounts in CSV convert command
- Value corruption when converting currencies at high precision HOT 2
- Make "reg" output the account balance HOT 4
- musl tests fails HOT 5
- Accept numbers with a trailing decimal mark HOT 1
- 6 python tests failing in 3.3.0 HOT 36
- Intervals are always aligned with start of week, month, quarter or year
- Balance assertion fails with lot-priced commodities HOT 1
- Reading a second journal from Python causes an assertion failure HOT 4
- Commodity exchange (-X, --exchange) does not work properly for quoted commodities
- payee alias syntax is confusing HOT 1
- Tests relating to python support should be avoided if ledger is built without python support HOT 3
- `test/python/TransactionTest.py` leads to segfault
- Error: Balance assertion off by $-0.00
- Assertion failure when using group-by and amount
- Python tests fail, rather than being skipped, when ledger is built without Python support HOT 2
- Ledger 3.3.2 cannot be built with Python 3.12 support HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ledger.