Working with Spans and Strings
Вставка
- Опубліковано 31 тра 2024
- Salih shows us how and why we need to use Spans when we are evaluating strings.
Chapters:
0:00 - Introduction
1:20 - Reviewing how strings are immutable
4:45 - Reviewing how memory works
5:45 - Introducing the lists of strings we will process
7:55 - Reviewing how spans work
10:00 - Processing the list of strings using Substring
14:15 - Processing the list of strings using Split
15:25 - Processing the list of strings using Regex
16:00 - Processing the list of strings using Span
20:20 - Benchmarking the different options
22:15 - Wrap-up - Наука та технологія
I learned something new today,
Using Spans looks very logical in some cases.
Please bring up more of these topics to the channel.
Thanks you Robert and Salih!
Spans are very efficient tools if you know to get the best out of it :)
@@TechBuddyTR Indeed, it reminds me of the old days where we try to save every bit of the memory when the whole system has 64K RAM.
You did a great job demonstrating different approaches to solve the same problem so that one can appreciate using Spans.
Please consider making more videos like this (In English if possible)
Thanks Salih👍
@@ahmad-murery I've over 250 videos in Turkish tho but I'm planning to start making videos in English in 2024 as a new year goal :) Stay tuned
@@TechBuddyTR Nice, Consider me subscribed🚀
Awesome! Straight to the point with great code example 👍
thank you salil cantekin for this beautiful content
Thanks :)
Great! Robert and Salih, thank you very much.👍
Thanks
Thanks Mr.Salih 🚀
Thanks my friend
thanks, awesome explanation
Increíble, pero yo quisiera saber, donde puedo ver esa información tan detallada en Microsoft?? la documentación que eh visto, no da una explicación.
Great video! What about memory leaks though, what if a class needs a substring, it will hold a reference to the string, this means the original string will stay in memory without being collected, right?
Span itself is a Struct already. So once it's used, it's removed from Stack, which means the reference of the original string is not stored anywhere so it can be collected.
Is this a theme of visual studio he is using or default theme?
it was the default theme
hello sir / madam
i am visual studio ( VB ) software developer
i create a application , there 3 to 4 png image, when i put it one by one ( with background color Transparent ) its show my form background not image Transparent, i think your software developer not use photoshop or CorelDraw application (Layer 1 , Layer 2 , Layer 2 )
when i move Layer 1 , Layer 2 or Layer 3 its not show page background ( Control background ) its show behind image background into Transparent color , same in android studio application , for this type work why i use unity or other software , please update picture box and image box property
i hope you understand what i want.
Of course there are memory allocations, but not for handling new strings, which we see in the final result that there are still 16 kB of int/DateTime allocations.
int and DateTime are value types so don't cause any allocation on heap. That 16kb was something else :) we still had to create string allocation, which was the reason
"I'm form 🇹🇷" daha hoş olurdu. Neyse takılmıyoruz bunlara, tebrikler Salih hocam 👍
Nerede yaşadığımı söylüyorum aslında :)
WIll it be your ideas Citus Altius Fortius, because that building is university campus computer center and it's not my part time or full stack developer (Who shows all the cards to everybody beginning the game) job or hobby after the work, because now I want to meet you again after the holidays Kit Club, because getting into that company is as rotary club for VIP as it was into college for every alumni for outerbanks pogues obviously who are hired to serve the food for Iskaara
There is nothing to know, but bikini is covering whole body so let me forget all the Havoc and Vengeance behind a school windows in the classroom - Ukrane or Iran I don't care... My life calling is coding. My problem is not this assigning value, my problem is how can find every video of Gitanas Nausėda and print it as a list. So German or Russia - you don't want that and I may ask to propose three or more business proposals until the presidential election next year, because it's not my hobby, but a denial to be able to get this .NET career and I don't understand why, but maybe my IVY bridge CPU knows. 6:10 I will let them know only if they are followers if(not){Must dig in the text as Looam Niffen} 6:10, but you pretty nothing here as a rock star to seek you.