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
@SimonJentzschX76 күн бұрын
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-q6q14 күн бұрын
Strager I can't find any of your videos on twitch. You are not creating anymore?
@soi573016 күн бұрын
How about store Length with uint. Then Check the bound with if ( MAX - MIN(11 - 2 = 9) < Length - MIN (Length - 2))
@jovar754517 күн бұрын
do an update please
@Cirwlos19 күн бұрын
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.
@berndeckenfels20 күн бұрын
Using the last chars seems a problem as it might not be word aligned.
@k1m124 күн бұрын
Never trust programer who have window logo on his t-shirt
@grzegorzmajcher923724 күн бұрын
That burp was nasty!
@wesleytaylor-rendal564825 күн бұрын
Pro hack... Use a fpga. With a time machine.
@PerryCodes27 күн бұрын
"I really enjoy rolling whenever I can." - said every raver ever.
@seeharvester28 күн бұрын
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.johnson29 күн бұрын
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.
@hermes691029 күн бұрын
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...
@poutineausyropderable710829 күн бұрын
Explain what's wrong?
@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
@dublindynamicdrive24 күн бұрын
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Ай бұрын
The thumbnail 💀
@NovikovrusАй бұрын
What about using a GPU for some operations? It could be the next level of extreme optimization.
@jakebrowning2373Ай бұрын
Isn't this overfitting to your dataset? Or is that the point
@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Ай бұрын
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Ай бұрын
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Ай бұрын
Whoever decided that those two creatures in the thumbnail deserved butt cheeks.. You're awesome.
@MrTweetyhackАй бұрын
this is gold!
@lemonke8132Ай бұрын
Could the native c++ hash function be swapped out for this one? Or is it more general?
@HarryFortyTwoАй бұрын
and then someone adds debug0er and expects the code work. Seems code that relies on unique hashvalues is a maintenance nightmare.
@kab43Ай бұрын
ferris gyatt....
@jackypaulcukjati3186Ай бұрын
Awesome Strager! Love it!
@pktr2320Ай бұрын
I hope you start doing videos about Rust, C++ and Javascript again. Such a fantastic channel and so little activity
@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Ай бұрын
Well done. Now make that Rust crate !
@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Ай бұрын
А можешь сделать обзор на самую новую перспективную крипту? сейчас столько всего нового выходит, за всем не успеваешь следить...
@eshwanthkartitr6711Ай бұрын
the thumbnail is wild
@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Ай бұрын
That’s a hooli tee
@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Ай бұрын
"Monday, Tuesday, Thursday, Wednesday...." Love the Godfather joke :D
@ReggieMeislerАй бұрын
You are a phenomenal teacher. Thanks for these videos.
@albizutoday2754Ай бұрын
Rust > Go
@Gonz-o8jАй бұрын
Tipazo
@asymptotee9Ай бұрын
Huge respect, a lot to learn 💗
@flybekvcАй бұрын
13:25 if you burped for real, you 're a pig
@vnc.tАй бұрын
you know the data ahead of time, just make an enum
@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-72 ай бұрын
Wtfff. Insane
@agedvagabond2 ай бұрын
Use ahash in rust instead of hash, unless you need the security of std hash.