Speed Test

Posted By: Proomer

Speed Test - 03/03/13 10:51

I was wondering if the Zorro Team could make a comparative speed test. I read on the website that they claim Lite-C is 3 times faster than C# so the speed test on Big Mike's forum should be interesting:

[link]http://www.bigmiketrading.com/multichart...timization.html[/link]

I tried to port the code but got stuck on the summation of series. The optimization is done from 20 to 100 for all parameters with steps of 20 and it takes less than 7 min on both MC and NT. The data is 2 years of ES 5 min bars (regular trading hours only). The interesting here is not the profit but how long it takes with the same number of optimization steps and same number of bars.
Posted By: jcl

Re: Speed Test - 03/04/13 10:17

The code on that forum is not a speed test. It does not test the speed of the script language, but only of the indicator library and the optimizing algorithm. For a real speed test of a script language, you use a loop that does some math calculations or array operations, but calls no external functions or indicators.

- Summation goes like this:

Code:
var ma1v    = SMA(Close, ma1len);
var ma2v    = EMA(Close, ma2len);
var ma3v    = WMA(Close, ma3len);
var ma4v    = SMA(series(ma1v+ma2v+ma3v), ma4len);

Posted By: Proomer

Re: Speed Test - 03/05/13 18:31

I managed to do the speed test and even though Zorro is not multi-threaded (as far as I know) the result was that Zorro is actually faster, almost 2x. How that is possible is beyond me. Perhaps the Zorro Team can explain.
Posted By: jcl

Re: Speed Test - 03/06/13 09:45

I think it has not much significance in this case. For a real test you had to compare the speed on the same PC under identical conditions, and test script, indicators, and platform separately.

Ninja uses C#, which is slower than lite-C. On the other hand, Ninja's moving averages use an accumulating formula that calculates the last term only, while the ta-lib MAs used by Zorro are completely re-calculated on any call and are thus slower. In most cases Zorro is faster than Ninja, but in this special case it might be just chance.

As to my knowledge, no trade platform really supports multithreading. Those that advertise with multithreading just mean that separate algorithms run in different threads.
© 2023 lite-C Forums