Standard Performance: C¶
Competitors: Tulip Indicators (C) and TA-Lib (C), called through the tulip_rs_ffi_c hand-rolled extern "C" FFI.
| Indicator | tulip_rs_ffi_c (ns) | C Tulip (ns) | Speedup vs C | TA-Lib (ns) | Speedup vs TA-Lib |
|---|---|---|---|---|---|
ad |
4,804 | 4,752 | 0.99x | 4,759 | 0.99x |
adaptivemsw |
529,643 | N/A | --- | N/A | --- |
adosc |
5,650 | 8,979 | 1.59x | 8,546 | 1.51x |
adx |
10,805 | 9,926 | 0.92x | 38,167 | 3.53x |
adxr |
13,422 | 13,099 | 0.98x | 39,274 | 2.93x |
ao |
5,624 | 4,525 | 0.80x | N/A | --- |
apo |
4,871 | 8,676 | 1.78x | 10,363 | 2.13x |
aroon |
17,142 | 80,292 | 4.68x | 38,646 | 2.25x |
aroonosc |
20,001 | 81,995 | 4.10x | 36,039 | 1.80x |
atr |
4,827 | 10,634 | 2.20x | 26,782 | 5.55x |
avgprice |
1,416 | 1,376 | 0.97x | 1,679 | 1.19x |
bbands |
7,276 | 7,152 | 0.98x | 19,476 | 2.68x |
bop |
2,440 | 2,387 | 0.98x | 4,756 | 1.95x |
ccfisher |
227,633 | N/A | --- | N/A | --- |
cci |
78,552 | 73,955 | 0.94x | 111,835 | 1.42x |
chaikinmf |
9,545 | N/A | --- | N/A | --- |
chandelierexit |
17,323 | N/A | --- | N/A | --- |
cmo |
6,825 | 6,602 | 0.97x | 25,918 | 3.80x |
cvi |
4,871 | 14,102 | 2.90x | N/A | --- |
cybercycle |
16,671 | N/A | --- | N/A | --- |
dema |
5,807 | 6,416 | 1.10x | 22,298 | 3.84x |
di |
17,716 | 9,847 | 0.56x | 56,974 | 3.22x |
dm |
9,012 | 5,995 | 0.67x | N/A | --- |
donchianchannel |
13,119 | 49,012 | 3.74x | N/A | --- |
dpo |
2,495 | 2,413 | 0.97x | N/A | --- |
dx |
9,805 | 7,500 | 0.76x | 37,897 | 3.86x |
ef |
4,825 | N/A | --- | N/A | --- |
elderray |
6,067 | 10,681 | 1.76x | N/A | --- |
ema |
4,797 | 10,677 | 2.23x | 10,650 | 2.22x |
emv |
2,440 | 4,812 | 1.97x | N/A | --- |
fisher |
60,602 | 77,594 | 1.28x | N/A | --- |
fosc |
8,219 | 9,369 | 1.14x | N/A | --- |
highpass |
4,818 | N/A | --- | N/A | --- |
hma |
8,626 | 9,416 | 1.09x | N/A | --- |
ichimoku |
73,944 | N/A | --- | N/A | --- |
kama |
6,984 | 8,384 | 1.20x | 10,714 | 1.53x |
keltnerchannel |
6,682 | N/A | --- | N/A | --- |
kvo |
9,079 | 8,928 | 0.98x | N/A | --- |
linreg |
7,269 | 8,890 | 1.22x | 56,983 | 7.84x |
macd |
6,290 | 12,384 | 1.97x | 34,405 | 5.47x |
mama |
219,883 | N/A | --- | 224,302 | 1.02x |
marketfi |
2,434 | 2,387 | 0.98x | N/A | --- |
mass |
5,710 | 11,856 | 2.08x | N/A | --- |
max |
5,929 | 20,089 | 3.39x | 10,539 | 1.78x |
md |
15,293 | 15,884 | 1.04x | N/A | --- |
medprice |
894 | 837 | 0.94x | 876 | 0.98x |
mfi |
8,658 | 11,843 | 1.37x | 9,856 | 1.14x |
min |
6,565 | 27,414 | 4.18x | 14,635 | 2.23x |
mom |
796 | 742 | 0.93x | 767 | 0.96x |
msw |
129,569 | 666,135 | 5.14x | N/A | --- |
natr |
5,630 | 10,642 | 1.89x | 26,743 | 4.75x |
nvi |
2,674 | 3,670 | 1.37x | N/A | --- |
obv |
3,558 | 6,608 | 1.86x | 3,873 | 1.09x |
pivotpoint |
88 | N/A | --- | N/A | --- |
ppo |
5,527 | 9,291 | 1.68x | 14,223 | 2.57x |
psar |
10,741 | 10,209 | 0.95x | 8,517 | 0.79x |
pvi |
2,741 | 3,624 | 1.32x | N/A | --- |
qstick |
2,620 | 2,535 | 0.97x | N/A | --- |
roc |
2,431 | 2,366 | 0.97x | 4,739 | 1.95x |
rocr |
2,419 | 2,362 | 0.98x | 4,721 | 1.95x |
roofingfilter |
10,766 | N/A | --- | N/A | --- |
rsi |
5,355 | 12,231 | 2.28x | 25,828 | 4.82x |
sma |
2,466 | 2,343 | 0.95x | 4,693 | 1.90x |
smaenvelope |
6,980 | N/A | --- | N/A | --- |
stddev |
7,192 | 7,129 | 0.99x | 16,581 | 2.31x |
stoch |
21,743 | 91,855 | 4.22x | 53,451 | 2.46x |
stochrsi |
19,251 | 33,706 | 1.75x | 50,252 | 2.61x |
supersmoother |
10,733 | N/A | --- | N/A | --- |
supertrend |
11,921 | N/A | --- | N/A | --- |
tema |
6,791 | 6,589 | 0.97x | 33,092 | 4.87x |
tr |
1,395 | 1,439 | 1.03x | 1,903 | 1.36x |
trendmode |
219,756 | N/A | --- | N/A | --- |
trima |
5,381 | 7,111 | 1.32x | 7,105 | 1.32x |
trix |
6,746 | 10,664 | 1.58x | 36,414 | 5.40x |
trvi |
5,758 | N/A | --- | N/A | --- |
tsf |
6,946 | 9,086 | 1.31x | 57,738 | 8.31x |
typprice |
1,185 | 1,247 | 1.05x | 2,382 | 2.01x |
ultosc |
15,526 | 15,431 | 0.99x | 45,645 | 2.94x |
vhf |
13,407 | 49,686 | 3.71x | N/A | --- |
vidya |
12,025 | 18,908 | 1.57x | N/A | --- |
volatility |
12,123 | 17,856 | 1.47x | N/A | --- |
vortex |
7,934 | N/A | --- | N/A | --- |
vosc |
4,830 | 4,798 | 0.99x | N/A | --- |
vwap |
4,809 | N/A | --- | N/A | --- |
vwma |
4,816 | 4,744 | 0.99x | N/A | --- |
wad |
3,798 | 4,625 | 1.22x | N/A | --- |
wcprice |
1,197 | 1,252 | 1.05x | N/A | --- |
wilders |
4,785 | 10,626 | 2.22x | N/A | --- |
willr |
14,532 | 82,744 | 5.69x | 41,579 | 2.86x |
wma |
4,801 | 8,317 | 1.73x | 4,769 | 0.99x |
zlema |
5,985 | 8,290 | 1.39x | N/A | --- |
Notable results
tulip_rs_ffi_c beats C_tulip on 45 of 72 compared indicators (of 91 indicators benchmarked via the FFI).
Median speedup vs C_tulip: 1.73x.
Largest wins vs C_tulip:
| Indicator | Speedup vs C | Speedup vs TA-Lib |
|---|---|---|
willr |
5.69x | 2.86x |
msw |
5.14x | --- |
aroon |
4.68x | 2.25x |
stoch |
4.22x | 2.46x |
min |
4.18x | 2.23x |
aroonosc |
4.10x | 1.80x |
donchianchannel |
3.74x | --- |
vhf |
3.71x | --- |
max |
3.39x | 1.78x |
cvi |
2.90x | --- |
Smallest margins (C_tulip's vectorised or state-light paths):
| Indicator | Rust native (ns) | tulip_rs_ffi_c (ns) | C Tulip (ns) | Speedup vs C |
|---|---|---|---|---|
tr |
1,393 | 1,395 | 1,439 | 1.03× |
md |
13,911 | 15,293 | 15,884 | 1.04× |
typprice |
1,086 | 1,185 | 1,247 | 1.05× |
wcprice |
1,075 | 1,197 | 1,252 | 1.05× |
hma |
9,349 | 8,626 | 9,416 | 1.09× |
dema |
6,336 | 5,807 | 6,416 | 1.10× |
FFI boundary overhead — tulip_rs_ffi_c tracks native Rust closely: for the fastest-running indicators the call overhead is 0.9–1.1× Rust native (argument marshalling only, no runtime):
| Indicator | Rust native (ns) | tulip_rs_ffi_c (ns) | Overhead |
|---|---|---|---|
mom |
897 | 796 | ~0.9× |
avgprice |
1,433 | 1,416 | ~1.0× |
tr |
1,393 | 1,395 | ~1.0× |
medprice |
872 | 894 | ~1.0× |
typprice |
1,086 | 1,185 | ~1.1× |
wcprice |
1,075 | 1,197 | ~1.1× |