FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Improve Indicator Performance Benchmark by Martin-Molinero · Pull Request #24 · QuantConnect/pythonnet · GitHub

Improve Indicator Performance Benchmark - #24

Merged
jaredbroad merged 2 commits into
QuantConnect:masterfrom
Martin-Molinero:performance-qc2925-improve-indicator-benchmark
Feb 20, 2019
Merged

Improve Indicator Performance Benchmark#24
jaredbroad merged 2 commits into
QuantConnect:masterfrom
Martin-Molinero:performance-qc2925-improve-indicator-benchmark

Conversation

Copy link
Copy Markdown
Member

What does this implement/fix? Explain your changes.

  • Adding new interop type cache holding a bool, true if its an exception.
  • Adding a setter and getter cache for the propertyobject.

How Has This Been Tested?

Tested exeucting QuantConnect unit and regression tests and indicator performance benchmark:

[MASTER]

[PR]

[MASTER]
160.95 seconds at 5k data points per second. Processing total of 782,223 data points.
158.54 seconds at 5k data points per second. Processing total of 782,223 data points.
159.95 seconds at 5k data points per second. Processing total of 782,223 data points.
[PR]
132.27 seconds at 6k data points per second. Processing total of 782,223 data points.
130.07 seconds at 6k data points per second. Processing total of 782,223 data points.
129.88 seconds at 6k data points per second. Processing total of 782,223 data points.

[PR] has a 15-20% speed improvement.

Note
Testing showed no signficant impact on the BasicTemplateAlgorithm performance benchmark:
python_benchmark_algo.txt

Does this close any currently open issues?

Related to QuantConnect/Lean#2925

- Adding new `interop` `type` cache holding a `bool`, true if its an `exception`.
- Adding a `setter` and `getter` cache for the `propertyobject`.
Comment thread src/runtime/propertyobject.cs Outdated
var instance = Expression.Convert(obj, methodInfo.DeclaringType);

var value = Expression.Parameter(typeof(object));
var argument = Expression.Convert(value, methodInfo.GetParameters()[0].ParameterType);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Can methodInfo.GetParameters() return null or empty list?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Since methodInfo is the setter I don't think it should happen, but I'll add a check to be in the safe side 👍


var expressionCall = Expression.Call(instance, methodInfo, argument);

return Expression.Lambda<Action<object, object>>(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

❤️

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL