5 ways quant developers speed up their code (without external hardware)

  Рет қаралды 24,353

Coding Jesus

Coding Jesus

Күн бұрын

In this video I go over 5 ways that quant devs increase the speed of their code without relying on external hardware (also going above and beyond 'write clean code'). This mostly comes from understanding the inner workings of a computer, which is a mystery to most (and is still largely a mystery to me as I continue to learn). I'm sharing with you five best practices, essentially.
www.codingjesus.com
Bo Qian - Static Polymorphism: • Advanced C++: Static P...
Would you like to tithe to The Church of Coding Jesus 💸? www.patreon.com/codingjesus?f...
1-on-1 private resume reviews and career consulting/mentoring 🗓️: calendly.com/coding-jesus
Want to join dozens of disciples and become part of The Church of Coding Jesus 🙏? / discord
Email: thecodingjesus@codingjesus.com
87wZCoEfvb6AXfJtwwv2EGVc3f6UafSZM39CZ2xRLU1dKvLYK3x6JGbP4bj8iatHdwU3BnSvPfyKPVjwDKBepufSRDT1Kub
day trading increase speed of code code increase speed, faster execution of code, code speed increases, ways to increase your code speed, ways to increase the speed of your code. Great ways to increase the speed of your code in cpp c++. How to make your code go faster a lot involves understanding the inner workings of the cpu, registers, memory bus, etc, when it comes to actually writing code. Of course the code needs to be clean to begin with

Пікірлер: 62
@CodingJesus
@CodingJesus 3 жыл бұрын
@rahulprasad2318
@rahulprasad2318 3 жыл бұрын
CJ can you have a guest who can cover the hardware side of things?🤔
@optimizedpran1247
@optimizedpran1247 3 жыл бұрын
He knows his shit.
@eyeborg3148
@eyeborg3148 2 жыл бұрын
Yes, branch prediction is very important for performance. I remember one lecture our professor showed us a die shot of an Intel CPU and I was surprised by just how large the branch prediction section was. The cost of a branch missed not only includes finding the right instruction in cache/memory but also flushing the current pipeline and undoing any changes made. That being said, modern compilers are really smart and often can optimize away simple branches (lookup branchless programming) to improve performance. If you try to do it yourself (e.g. avoiding if statements) your code will probably be slower than the compiler’s binary. So unless it’s something obvious (like shown in the video) there’s not much a point going out of your way to avoid branches.
@itsbk6192
@itsbk6192 2 жыл бұрын
tl;dr: Profile before you go senile
@gianni50725
@gianni50725 2 жыл бұрын
Eliminating branches in the hot path is still often beneficial. **Always measure** but we’re talking about people that may need to care about nanoseconds of execution time.
@daanialahmad1759
@daanialahmad1759 3 жыл бұрын
Thank you Sir for such nice and informative stuff.Please keep us educated
@asishbalu2415
@asishbalu2415 3 жыл бұрын
Hey coding jesus! I was wondering could you do a video detailing the various technical roles in trading firms? Ex. Id like to understand the differences between quant developers and regular infrastructure developers at these firms (technologies used, pay, hours, typical day, etc.) Thanks for your helpful videos!
@splendorman7922
@splendorman7922 Жыл бұрын
why did you stop posting videos Jesus? These kind of videos do not exist anywhere else, very educative. so please keep posting videos man
@Golipillas
@Golipillas 3 жыл бұрын
CJ, enlighten us on processor affinity in one of your next sermons 📙
@gsf4lyf
@gsf4lyf Жыл бұрын
Great video, thank you!
@Nimbus2k_rider
@Nimbus2k_rider 10 ай бұрын
Awesome man..thanks
@paulbrown5839
@paulbrown5839 2 жыл бұрын
If you are writing anything distributed, then the cost of virtual functions is no issue compared to going on the wire. Is your stuff all inprocess?
@paulbrown5839
@paulbrown5839 2 жыл бұрын
The order of those conditions in 7:05 is important, you should order them according to the probability of them being hit, so you climb the ladder as little as possible :)
@gokul6033
@gokul6033 3 жыл бұрын
tysm for making this
@litical3719
@litical3719 14 күн бұрын
great vid
@riseup902
@riseup902 3 ай бұрын
You can perhaps switch to a Switch statement as well as that is more perfomant then using a bunch of nested IF statements.
@colinmaharaj
@colinmaharaj 2 жыл бұрын
Your point 1, I allocate / deallocate at the top and end of large code blocks. I never alloc/dealloc in tight loops
@KabbalahredemptionBlogspot
@KabbalahredemptionBlogspot 2 жыл бұрын
Dude. You're cool as hell.
@tahashakeel
@tahashakeel 5 ай бұрын
in the reduce branches section the handle error function, to which we are feeding the error codes, how will it return the different outputs based on different error codes? Is that function using the if or switch statements internally? is it something else? Great Video by the way! Quite informative.
@codinger4182
@codinger4182 3 жыл бұрын
2:58 Basically it is the concept of fragmentation
@moisascholar
@moisascholar 3 күн бұрын
1. Using too much stack memory can end up degrading performance. You need to always profile for these kind of things. 2. Virtual functions/dynamic dispatch is no longer a huge performance hit on modern CPUs. Highly recommend using this for 1 or 2 level inheritance/subclasses as opposed to templates which beget more templates and end up obfuscating your codebase. Use constexpr/constinit/constevel as much as possible instead. Otherwise you're spot on with reducing branches/branch mis-prediction and cache warming.
@Najibway
@Najibway Жыл бұрын
What are the cons of warming of cache? Btw this video is very valuable.
@abuusayd1932
@abuusayd1932 3 жыл бұрын
Learned some advance Technical Analysis today 😂
@kylegarland6150
@kylegarland6150 Жыл бұрын
>don't use the heap Sounds like y'all quant devs aren't much different than us embedded lads haha. Nice video mate, cheers.
@gigiduru125
@gigiduru125 2 жыл бұрын
Solid tips every programmer should know.
@gianni50725
@gianni50725 2 жыл бұрын
No. Not every. Many programmers will misuse the advice about branch prediction even though branch mispredictions are far from the slowest operations you have to worry about. And woe if they try to go branchless altogether.
@siddharthabiswas2147
@siddharthabiswas2147 3 жыл бұрын
One of your better videos
@neel743
@neel743 3 жыл бұрын
Stop hating on daytraders and make more valuable videos like this
@CodingJesus
@CodingJesus 3 жыл бұрын
Yep, I’m done trying to reason with those people.
@lineage13
@lineage13 2 жыл бұрын
@@CodingJesus Day trading gurus advertise they are geniuses at technically analysis. All technically analysis really is, is just the identification of when everyone else buys or sells. But why would any of that matter? When they can just simply tell their followers when to buy or sell? It's not some sort of special skill set it's just the simple result of clout. If these people really were day trading gurus they'd go pit their followers against billionaires in large cap stocks and get demolished, instead of manipulating small cap stocks.
@annawilson3824
@annawilson3824 2 жыл бұрын
any good books for low latency devs?
@romp39
@romp39 2 жыл бұрын
Any insight on functional coding languages and where they fit in quant dev?
@sadhlife
@sadhlife 10 күн бұрын
they don't fit in quant dev at all. unless the quant firm is large enough to build their own languages and tooling for other languages that they need
@sadhlife
@sadhlife 10 күн бұрын
you can look into why jane street uses ocaml for example, there's a nice 1 hour presentation on that
@AnthonyDoesYouTube
@AnthonyDoesYouTube 3 жыл бұрын
This makes me want to go back to school for software engineering
@CodingJesus
@CodingJesus 3 жыл бұрын
You can self-teach!
@TheTaquitoProject
@TheTaquitoProject 2 жыл бұрын
@@CodingJesus True, although I personally learn much better in a class setting. It’s just that when starting from scratch, I don’t really know what direction to go in, and sometimes miss really important stuff.
@navengoud8102
@navengoud8102 2 жыл бұрын
Watching your videos is making me to code at god level
@jaserogers997
@jaserogers997 7 ай бұрын
No it's not.
@Eliel10268
@Eliel10268 3 жыл бұрын
We need Chinese vlogs nowadays to boost the channel!!
@zergeyn
@zergeyn 2 жыл бұрын
If these are the tricks you use to speed up your software, then.... I'm puzzled. The last advice imho is the only legit one, and the first 4 can be used to filter out noobs on the interview
@dankkush5678
@dankkush5678 2 жыл бұрын
no bullshit i like that
@AkiZukiLenn
@AkiZukiLenn 3 жыл бұрын
I thought its about quantum computer coding ...
@jjjobs5867
@jjjobs5867 3 жыл бұрын
branchless
@purplep3466
@purplep3466 3 жыл бұрын
Polymorphism?
@codinger4182
@codinger4182 3 жыл бұрын
Suppose you have `class A` and from this you inherited another class, say, `class B`. You can use a pointer of type A to refer to an object of B. A* ptr = new B(); If suppose A and B both have same functions definitions, say, codingjesus() but both of them does things differently. If you call the function A->codingjesus(), logically it should call the function of class B, but in reality it calls the function of class A. To do this, we need virtual function which bind dynamically during runtime. And, it can adjust itself to the type of object during runtime, hence we call it Polymorphism.
@gianni50725
@gianni50725 2 жыл бұрын
Unless it’s static polymorphism (e.g. templates) you should avoid it as much as possible. Think it goes without saying that static polymorphism, when polymorphism is needed, is usually desirable.
@meekee7553
@meekee7553 3 жыл бұрын
snorting coke
@theophiluschambers3628
@theophiluschambers3628 3 жыл бұрын
how to make money being a quant trader. = "sell education on youtube".....
@emileriksen2481
@emileriksen2481 3 жыл бұрын
Truest of truths.
@fetz5248
@fetz5248 3 жыл бұрын
Microdosing LSD
@leninotaloracriollo3932
@leninotaloracriollo3932 2 жыл бұрын
Details pls
@wrttn594
@wrttn594 3 жыл бұрын
Switch
@CodingJesus
@CodingJesus 3 жыл бұрын
No
@raysshine3504
@raysshine3504 3 жыл бұрын
Never. TA will destroy you as long as you use it.
@kantocoder5046
@kantocoder5046 3 жыл бұрын
@@CodingJesus Why? Did you do microprofiling?
@HitAndMissLab
@HitAndMissLab 10 ай бұрын
Why don't you call yourself "Coding Allah". You are obviously trying to be offensive to Christians by calling yourself "Coding Jesus".
@brandonbrandon9965
@brandonbrandon9965 7 ай бұрын
What lmao
How I learned to code in 3 months (and got several offers)
12:54
Coding Jesus
Рет қаралды 194 М.
How to solve quant puzzles
13:09
Coding Jesus
Рет қаралды 92 М.
Comfortable 🤣 #comedy #funny
00:34
Micky Makeover
Рет қаралды 13 МЛН
Алексей Щербаков разнес ВДВшников
00:47
SPILLED CHOCKY MILK PRANK ON BROTHER 😂 #shorts
00:12
Savage Vlogs
Рет қаралды 15 МЛН
Little brothers couldn't stay calm when they noticed a bin lorry #shorts
00:32
Fabiosa Best Lifehacks
Рет қаралды 6 МЛН
What is a quant? (explained by a quant developer)
11:06
Coding Jesus
Рет қаралды 122 М.
FIX protocol (explained by a quant developer)
18:35
Coding Jesus
Рет қаралды 42 М.
5 misconceptions about becoming a quant trader
12:15
Coding Jesus
Рет қаралды 36 М.
How to break into high frequency trading (as a software developer)
10:32
The quant trading job market is...
19:24
Coding Jesus
Рет қаралды 29 М.
How much money do quant developers make?
10:16
Coding Jesus
Рет қаралды 75 М.
What is a Quant? -  Financial Quantitative Analyst
10:03
QuantPy
Рет қаралды 497 М.
How to Become a Quant: Core Topics
11:25
Dimitri Bianco
Рет қаралды 93 М.
Как противодействовать FPV дронам
44:34
Стратег Диванного Легиона
Рет қаралды 133 М.
Tag him😳💕 #miniphone #iphone #samsung #smartphone #fy
0:11
Pockify™
Рет қаралды 4,9 МЛН
Vision Pro наконец-то доработали! Но не Apple!
0:40
ÉЖИ АКСЁНОВ
Рет қаралды 803 М.