I started my first Full stack SWE role 6 months ago after CS undergrad. Best way I can describe typescript is a way to get client side JS code to behave closer to server side code and eliminate a lot of errors/bugs before run time. TS doesn’t really exist (as the seniors say lol), it just compiles to JS. I’m surprised how fast Typescript was too on this
@@sprightly106 I’ll find a way to have it provided. Someone did a pull request on the repo and got the Vanilla rust to 0.06 and the enhanced to 0.03. Gotta figure out how I want to merge it
@@rafaabreu5563 hi. I’m glad you think it’s cool. I started trading, then I learned some programming and after I found out I can code my own strategies I was hooked
@@rafaabreu5563 Books like Fooled By Randomness and The Misbehavior of Markets. Quant news letters for code that is what it is, like no need to over engineer. And learn different parts of linear algebra, calc, and topology and then if you need help with the programming use an LLM to ask it questions, but better to not have it write you any code. And my channel of course :). Hope that helps.
There is something very wrong here. Your results for Rust are an order of magnitude too slow. I suspect you did not run a release build "cargo run --release". Even then when checking out your repo and building the rust and c++ I find the Rust is much slower. There is no reason the Rust and C++ versions should not be running at almost the same speed. I suspect you have taken a huge performance hit by using all that iter, enumerate, map, lambda stuff in Rust rather than normal for loops and indexed addressing as you do in C++.
Why compare different code structures while using third-party libraries in one language but not the other? Even for the same task, using different third-party libraries is unfair. In Python, you used NumPy (which is written in C and highly optimized), but in Rust, you used nested Vec types instead of a comparable third-party library like ndarray. This comparison is unfair to Rustaceans, as it doesn't showcase Rust's true potential. Seeing Rust at the bottom of the performance chart feels disappointing and misleading. A fair comparison would either avoid third-party libraries entirely or use equivalent ones in both languages. 😒
he did not benefit from numpy lmao. Look at his train method he still manually loops through each number instead of using numpy operations. It would be faster if he used python lists
Rust code is unfair. You using OpenMP on CPP code which is true parallelism library and Tokio in Rust which is just a async runtime. You cloning everything. You shouldn't do that instead you can access your objects through shared pointers (Arc/Rc) and Interior mutability tools like Mutex if you need to mutate.
If you're going to benchmark and you don't know much about some languages, you should at least figure out how to disable debug mode. It's on by default in both Rust and Zig. Otherwise, it's all a bit ridiculous.
Man, you’re doing some really cool stuff, definitely my inspiration to get out and do something too! Keep the ball rolling!!!
Thank you!!
Let's goooo was waiting for this
🚀🚀🚀
for rust, make sure you want to have it run with the "--release" profile for the most optimized/performant build
@@SkegAudio thank you!
There are also some options to squeeze even more perf
@sketchychillandchill i bet. This was my best rust project
Would have been nice to visualize the data better
I started my first Full stack SWE role 6 months ago after CS undergrad. Best way I can describe typescript is a way to get client side JS code to behave closer to server side code and eliminate a lot of errors/bugs before run time. TS doesn’t really exist (as the seniors say lol), it just compiles to JS. I’m surprised how fast Typescript was too on this
@@haleemhawkins8112 great point. I was also really surprised how fast it was
"I’m surprised how fast Typescript", ". I’m surprised how fast V8"
here is the corrected comment
bro a chad to code a neural network in cpp
The Zig one was way worse LMAO
There's already models in cpp
@ ofc but where’s the fun in that :)
Will you provide the updated Rust results?
@@sprightly106 I’ll find a way to have it provided. Someone did a pull request on the repo and got the Vanilla rust to 0.06 and the enhanced to 0.03. Gotta figure out how I want to merge it
Bro, I am taking a look at your content and everything seems pretty cool, how did you start with quant engineering?
@@rafaabreu5563 hi. I’m glad you think it’s cool. I started trading, then I learned some programming and after I found out I can code my own strategies I was hooked
@@scorsoneenterprises7230I just starting, any resource recommendation?
@@rafaabreu5563 Books like Fooled By Randomness and The Misbehavior of Markets. Quant news letters for code that is what it is, like no need to over engineer. And learn different parts of linear algebra, calc, and topology and then if you need help with the programming use an LLM to ask it questions, but better to not have it write you any code. And my channel of course :). Hope that helps.
@@scorsoneenterprises7230 thx a lot
There's now a way to turn off the GIL in python 3.13, if you need it
I just saw that today actually. Could make the language really interesting now thank you for the tip though :)
57:12 Results
Lol, debug Rust build beats Python!
There is something very wrong here. Your results for Rust are an order of magnitude too slow. I suspect you did not run a release build "cargo run --release". Even then when checking out your repo and building the rust and c++ I find the Rust is much slower. There is no reason the Rust and C++ versions should not be running at almost the same speed. I suspect you have taken a huge performance hit by using all that iter, enumerate, map, lambda stuff in Rust rather than normal for loops and indexed addressing as you do in C++.
@@Heater-v1.0.0 i bet you’re correct my friend. This was my first rust project.
Why compare different code structures while using third-party libraries in one language but not the other? Even for the same task, using different third-party libraries is unfair. In Python, you used NumPy (which is written in C and highly optimized), but in Rust, you used nested Vec types instead of a comparable third-party library like ndarray. This comparison is unfair to Rustaceans, as it doesn't showcase Rust's true potential. Seeing Rust at the bottom of the performance chart feels disappointing and misleading.
A fair comparison would either avoid third-party libraries entirely or use equivalent ones in both languages. 😒
he did not benefit from numpy lmao. Look at his train method he still manually loops through each number instead of using numpy operations. It would be faster if he used python lists
Yeah I agree that I didn’t really benefit from numpy. This was the first thing I wrote in rust
@@thisisbstar7 if you have the time and care if you fork the repo and redo the rust I’d be happy to learn from you
Rust code is unfair.
You using OpenMP on CPP code which is true parallelism library and Tokio in Rust which is just a async runtime.
You cloning everything. You shouldn't do that instead you can access your objects through shared pointers (Arc/Rc) and Interior mutability tools like Mutex if you need to mutate.
Yeah first Rust project. I probably rushed to record it.
you are doing something wrong in rust
It has come to my attention hahaha
If you're going to benchmark and you don't know much about some languages, you should at least figure out how to disable debug mode. It's on by default in both Rust and Zig. Otherwise, it's all a bit ridiculous.