[Python.NET] Speeding Up Pythonnet

Jared Broad jared at quantconnect.com
Tue May 22 08:39:37 EDT 2018


Hi All, my first post here =)

We're using Pythonnet in LEAN - an open source algorithmic trading
platform. We load the python object and then we make it look like a C#
interface
<https://github.com/QuantConnect/Lean/blob/master/AlgorithmFactory/Loader.cs#L170>
.

Each time a method/property is called we see 75% of the time being spent in
Pythonnet; and only 10-25% being actual work.

The raw C# version of LEAN runs up to 20x faster than our python layer;
we're looking for suggestions on how to improve the speed of the library /
C#-Py interop.

Thanks
Jared


-- 
Jared Broad

www.quantconnect.com
Phone-USA: +1 917 327 0556
*Democratizing Finance, Empowering Individuals*
Facebook <http://www.facebook.com/QuantConnect> | Twitter
<https://twitter.com/#!/QuantConnect> | LinkedIn
<http://www.linkedin.com/company/quantconnect> | Skype: jaredbroad

We're recruiting! Join us and make your mark on the future of finance
<https://www.quantconnect.com/jobs>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythondotnet/attachments/20180522/6e60145c/attachment-0001.html>


More information about the PythonDotNet mailing list