PingPong.jl
PingPong.jl copied to clipboard
Performance tweaks
backtest
- [ ] There are many repeated function calls like
openat,closeat,etc...
that could be memoized - [ ] Consider either removing
getproperty
for asset instances and strategies or replace all dot accessors within SimMode with somegetfield
wrapper function. Because the getproperty accessor is slower than getfield if it is customized - [ ] an alternative implementation for orders/trades would use arrays instead of structs to be more allocation friendly
watchers
- [ ] StructArrays or TypedTables could be used when fetching (streaming) ohlcv data feeds
- [ ] OHLCV watcher implementations parse the whole python dicts into named tuples (
CcxtTrade
,CcxtTicker
), in cases where full parsing is not required, the python data should be parsed more lazily
other
- [ ] Scour the codebase for lazy use of @view/s on assignments, that should be replaced with
copyto!
(starting from Data) - [ ] search/replace
Period
withFixedPeriod
to see if union splitting improves performance - [ ] Full specialization: many functions signatures are defined over generic types (non fully parametrized), benchmarks are needed to assert if full specialization is worth the extra compilation time / bin size