-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
Description
Expected Behavior
- Py and C# performance score of the indicator benchmark, are as close as possible
Actual Behavior
- C# performance score is at ~14 dps (data points per second), Python is at ~5 dps. https://www.quantconnect.com/status/
Potential Solution
-
magic()andGetValue()are hot spots (PythonNetcode https://github.com/QuantConnect/pythonnet).GetValue()uses reflection to find and call theGettermethod -> This could be cached. Same applies for theSettermethod (even if not triggered by this benchmark)ObjectOffset.magic()method returns an integer which is an offset. The returned int has two possible values depending on the python object type being an exception or not. -> we can have a type cache holding if its an exception or not.
- The cache can also be used byObjectOffset.DictOffset()andObjectOffset.Size()
Reproducing the Problem
Execute Py and C# Indicator benchmark algorithms, https://github.com/QuantConnect/Lean/blob/master/Algorithm.Python/Benchmarks/IndicatorRibbonBenchmark.py
System Information
N/A
Checklist
- I have completely filled out this template
- I have confirmed that this issue exists on the current
masterbranch - I have confirmed that this is not a duplicate issue by searching issues
- I have provided detailed steps to reproduce the issue
