Пікірлер
@anantmishra6783
@anantmishra6783 Күн бұрын
exceptional !
@hanumands50
@hanumands50 5 күн бұрын
After al this now is time to design the microprocesor ourselves so that its internal silicon structure is made to compare our especific data set and shit will fr be peak
@SimonJentzschX7
@SimonJentzschX7 6 күн бұрын
I love this kind of optimization. But the fastest hash.-function is a function you don't even execute,. for an embedded C project I macde the hash function static inline and used it as data.get(hash("myProp")). The compiler always calculated the hash value during compile time and just passed the uint32 value. You can't beat that! (of course it only works if you can guarantee there is no collision, which we explicitly checked)
@Audrius-q6q
@Audrius-q6q 14 күн бұрын
Strager I can't find any of your videos on twitch. You are not creating anymore?
@soi5730
@soi5730 16 күн бұрын
How about store Length with uint. Then Check the bound with if ( MAX - MIN(11 - 2 = 9) < Length - MIN (Length - 2))
@jovar7545
@jovar7545 17 күн бұрын
do an update please
@Cirwlos
@Cirwlos 19 күн бұрын
You left a lot of performance on the table, by not taking advantage of cache locality. If you insert in batches and read in batches, or if the insert/read operations are not interleaved, you can divide the tasks to improve cache locality and the efficiency of particular tasks. When inserting, you calculate the hash of multiple words together, which is faster because it keeps more data in the cache, and you can make better use of SWAR/SIMD techniques, processing multiple hashes at once. Then, in a different stage, you actually insert the words into the hash table. This may be faster because you may have buckets where words with common features are processed together. Also you don't need to store data that is repeated, like similar first and last letters, because that data is encoded in the position (indexed by the hash), and by storing smaller data, you improve cache locality. For example, hashes with collisions may be stored in an array buffer, and only when the buffer is full are the elements inserted into the table. Those elements have a lot in common, which is exploitable, and also write to the same memory region, which benefits from cache locality.
@berndeckenfels
@berndeckenfels 20 күн бұрын
Using the last chars seems a problem as it might not be word aligned.
@k1m1
@k1m1 24 күн бұрын
Never trust programer who have window logo on his t-shirt
@grzegorzmajcher9237
@grzegorzmajcher9237 24 күн бұрын
That burp was nasty!
@wesleytaylor-rendal5648
@wesleytaylor-rendal5648 25 күн бұрын
Pro hack... Use a fpga. With a time machine.
@PerryCodes
@PerryCodes 27 күн бұрын
"I really enjoy rolling whenever I can." - said every raver ever.
@seeharvester
@seeharvester 28 күн бұрын
Wow. You are very thorough. And type 115 wpm. So maybe you're the guy to ask about keyboards. My tying speed was about 24 wpm back in 7th grade when I took typing. Probably before your father was born. Anyway, I've long since forgotten all that, but my question is, can you recommend a keyboard to use with a windows pc that has the tactile feel of an Apple keyboard, and is wired to plug in to a usb, and is plug and play with no fuss; no muss? I had a Macbook (2008) that had the type of keyboard I prefer, but when that became no longer usable (obsolete) I bought a windows desktop pc, and the keyboard that came with it sucks compared to the macbook. Any suggestions?
@justin.johnson
@justin.johnson 29 күн бұрын
Ok bare metal buddy I can agree there is a ton of shit code in production but you can't just keep knocking the language that runs the web and web browsers. I guess don't use a web browser to get whatever it is you're looking for on GitHub. Just do everything from your terminal with vim. Or what else would you suggest? I'm confident you don't have nearly the amount of hours and years in front-end that I and others do.
@hermes6910
@hermes6910 29 күн бұрын
It's easy to say that you have a problem with your Bun portage. Bun is not perfect, but what you are showing is just that simply moving to Bun is not working, you need to work with bun and look at optimization that are not easy in Node. I agree that it's already 1y old so... time continue to fly. But except for some task of course where performance are the same because of external factors, when correctly developed bun is on par with Go (closely). Dont just look at basic benchmark of course, you have plenty of article about it, and you can find more complex tests. I'd have been surprised if the simple fact of running a node application in Bun made any big changes to the honest...
@poutineausyropderable7108
@poutineausyropderable7108 29 күн бұрын
Explain what's wrong?
@r1tual226
@r1tual226 Ай бұрын
I really dislike any programmer that doesn’t use a modern ide. It baffles me that someone wouldn’t want to use visual studio to write c++. I can understand people stick with what they learned on ; but using vim is just masochistic to me. Am I weird for that? I’ve always highly resisted writing code outside of a major ide
@dublindynamicdrive
@dublindynamicdrive 24 күн бұрын
i would just say that you’re missing the point, but considering that you mentioned you DISLIKE someone for their choice, i would also add you are a wanker and should shut your fuck up, clown 🤡
@ianthethird420
@ianthethird420 Ай бұрын
The thumbnail 💀
@Novikovrus
@Novikovrus Ай бұрын
What about using a GPU for some operations? It could be the next level of extreme optimization.
@jakebrowning2373
@jakebrowning2373 Ай бұрын
Isn't this overfitting to your dataset? Or is that the point
@TreeLuvBurdpu
@TreeLuvBurdpu Ай бұрын
"If Microsoft can't write a site without bugs then nobody can" is not a coherent claim. Microsoft is not the infallible code creator you take it to be
@DragonDePlatino
@DragonDePlatino Ай бұрын
If you have a known number of input strings (eg. mapping strings to enums, or detecting language keywords) the fastest data structure isn't even a hash table, it's a generated switch statement trie! No hashing and no collisions, and performance is always O(1) for any number of strings. This is how some compiler lexers work!
@Kurkkulimu
@Kurkkulimu Ай бұрын
Great video, I love these micro optimization ones. How about you try to test if memory alignment affects performance? It might have a big difference because memory loads take so much CPU time.
@jasona8396
@jasona8396 Ай бұрын
Whoever decided that those two creatures in the thumbnail deserved butt cheeks.. You're awesome.
@MrTweetyhack
@MrTweetyhack Ай бұрын
this is gold!
@lemonke8132
@lemonke8132 Ай бұрын
Could the native c++ hash function be swapped out for this one? Or is it more general?
@HarryFortyTwo
@HarryFortyTwo Ай бұрын
and then someone adds debug0er and expects the code work. Seems code that relies on unique hashvalues is a maintenance nightmare.
@kab43
@kab43 Ай бұрын
ferris gyatt....
@jackypaulcukjati3186
@jackypaulcukjati3186 Ай бұрын
Awesome Strager! Love it!
@pktr2320
@pktr2320 Ай бұрын
I hope you start doing videos about Rust, C++ and Javascript again. Such a fantastic channel and so little activity
@lukiluke9295
@lukiluke9295 Ай бұрын
I have an idea to improve this: Go back to a normal list and string comparisons. Check the first 4 characters by loading them as a uint64_t If they match do another 2 uint64t comparisons. This can be very fast since the whole table likely fits in level 1 cache and for most keys only one comparison is needed. Since the loop is so short also all instructions are likely in level 1 cache. This should also work on all modern processors not just intel.
@Polynuttery
@Polynuttery Ай бұрын
Well done. Now make that Rust crate !
@boredsherbet
@boredsherbet Ай бұрын
I rememer this guy reviewing my code once on twitch like 4 yers ago and I was too dumb to understand any of what he was talking about. nice to be back. subbed.
@LOUISLOUIS-b4q
@LOUISLOUIS-b4q Ай бұрын
А можешь сделать обзор на самую новую перспективную крипту? сейчас столько всего нового выходит, за всем не успеваешь следить...
@eshwanthkartitr6711
@eshwanthkartitr6711 Ай бұрын
the thumbnail is wild
@michaelmueller9635
@michaelmueller9635 Ай бұрын
If it looks like a nerd, if it swims like a nerd, if it talks like a nerd... ...it IS probably a nerd 😁
@mahipalrajpurohit7430
@mahipalrajpurohit7430 Ай бұрын
That’s a hooli tee
@WilliamCulver
@WilliamCulver Ай бұрын
nice vid and thanks for the deep dive. You didn't talk too much about the writing side though, this must be highly asymmetric as you mention you're doing a bunch of work to avoid collisions at time of writing, to give you a perf boost on the reading side. I can see there's a bunch of use cases for this type of approach though so thanks
@gothikia
@gothikia Ай бұрын
"Monday, Tuesday, Thursday, Wednesday...." Love the Godfather joke :D
@ReggieMeisler
@ReggieMeisler Ай бұрын
You are a phenomenal teacher. Thanks for these videos.
@albizutoday2754
@albizutoday2754 Ай бұрын
Rust > Go
@Gonz-o8j
@Gonz-o8j Ай бұрын
Tipazo
@asymptotee9
@asymptotee9 Ай бұрын
Huge respect, a lot to learn 💗
@flybekvc
@flybekvc Ай бұрын
13:25 if you burped for real, you 're a pig
@vnc.t
@vnc.t Ай бұрын
you know the data ahead of time, just make an enum
@fringeanomaly9284
@fringeanomaly9284 Ай бұрын
2:36 as every thing points to the same point the worst case would be o(n) bcz there would be collision everytime which to solve we could basically make it into an array ig? idk i am noob edit : 8:46 if it's a 32bit system making a 32bit key allows us to effectively use the memory available?? i guess 16:03 in your previous examples we saw that a lot of strings have same start and end character so i stead of putting additional overhead of other comparisons we could just check if they are same and skip overhead calculation of creating those 32bit etc etc etc 21:39 i don't know!! . but after googling i think ur memory alignment technique of adding 000 masks etc is the best
@Salehalanazi-7
@Salehalanazi-7 2 ай бұрын
Wtfff. Insane
@agedvagabond
@agedvagabond 2 ай бұрын
Use ahash in rust instead of hash, unless you need the security of std hash.
@ryleitdept
@ryleitdept 2 ай бұрын
C++ numbawan! 💪🍤