Span of T vs. Memory of T

  Рет қаралды 7,200

Jeff Zuerlein

Jeff Zuerlein

Күн бұрын

Пікірлер: 25
@timeless-sg
@timeless-sg 7 ай бұрын
Great! Thanks. This channel deserves much more subscribers. Please keep up the good work!
@JeffZuerlein
@JeffZuerlein 7 ай бұрын
Much appreciated!
@bhatsanket
@bhatsanket 8 ай бұрын
Really really like the tiitbits you are making... Nowadays because of things I am getting pushed away from programming but these really bring back memories... Ty! Please keep publishing
@JeffZuerlein
@JeffZuerlein 8 ай бұрын
That's so nice to hear! I've always loved the "internals" stuff, so it feels great to share with others.
@obinnaokafor6252
@obinnaokafor6252 7 ай бұрын
Nice video. Please could you do some videos on collection expression and type aliases, including Vectors and Intrinsics in C#?
@JeffZuerlein
@JeffZuerlein 7 ай бұрын
Thank you! I’m curious what’s you use case for Vector of T?
@obinnaokafor6252
@obinnaokafor6252 7 ай бұрын
@@JeffZuerlein used in computation and machine learning as well gaming
7 ай бұрын
Before this video I was thinking that I understand C#.... After this video I don't understand even heap and stack :D But thanks for sharing! Great video that pushes me (and pretty sure also other people) to learn new things!
7 ай бұрын
But let me ask you.... In high performance application, like game development (like Unity) - it is good to know Spans/Memory of ? Like when I need to calculate "millions" of data (position, rotation, etc...) with maximum performance - I must use these right ? (must.... Like.... I should to!)
@JeffZuerlein
@JeffZuerlein 7 ай бұрын
I haven’t written any games since I was using a C-64😂
@JeffZuerlein
@JeffZuerlein 7 ай бұрын
I can imagine them being out to use in a game.
@kudretkurt3832
@kudretkurt3832 10 ай бұрын
Great explanations!
@JeffZuerlein
@JeffZuerlein 10 ай бұрын
Thank you!
@amrswalha
@amrswalha 7 ай бұрын
Nice video with great details, all the best.
@JeffZuerlein
@JeffZuerlein 7 ай бұрын
Thank you for the supportive comments! I'm really enjoying it.
@kenbrady119
@kenbrady119 7 ай бұрын
Turning our code into pretzels to safeguard memory access and housekeeping ... makes me want to return to C++ for the truly low-level work.
@JeffZuerlein
@JeffZuerlein 7 ай бұрын
I understand that feeling. I don’t think spans and memory are for every project. I see them as a special tool for a special situation. When perf matters, it’s nice to know you have the option.
@oldgraycoder
@oldgraycoder 9 ай бұрын
Good stuff sir. Keep up the good work.
@JeffZuerlein
@JeffZuerlein 9 ай бұрын
I appreciate hearing that, and I will.
@groenrechts5948
@groenrechts5948 7 ай бұрын
And there goes yet another major selling point of C# into the garbage collector. Being a native C and C++ speaker this video makes me very happy, as I can now make even more fun of my C# colleagues. From many points of view this span stuff is just hilarious. And, for the record, it is well explained in the video. Nothing wrong with that.
@mar_sze
@mar_sze 7 ай бұрын
Making fun of *any* programming language is for junior developers. Seniors use each to their strengths. Span allows for low-level optimizations in high-performance scenarios, without sacrificing all the benefits of C#, like type- and memory-safety. Span comes with a lot of safe-guards, while C++ is *always* low-level, giving you more "freedom" but also more risk.
@groenrechts5948
@groenrechts5948 7 ай бұрын
@@mar_sze Question: Why should I not make fun of programming languages? They all have ridiculous features/notation/etc. Being allowed to use almost any date-type in an if-statement in C is hilarious, not to mention while loops intertwined with switch statements. Notation in C++ to remain backward compatible is sometimes ugly as hell and oftentimes super confusing for novices. Object oriented programming in Fortran90, what a joke it is. And so is C# filled with features that can be frowned upon. You see, as a senior developer I make fun of these things to remind people that programming languages are like a buffet where you should choose wisely what to eat and what not.
@JeffZuerlein
@JeffZuerlein 7 ай бұрын
There is plenty of code I like to make fun of…It has one author…Me. Over the years I’ve written plenty of programs that solved a problem, but suffered from many faults. It might look ill conceived, but that’s ok, it got the job done, and I got better because of it.
@JeffZuerlein
@JeffZuerlein 7 ай бұрын
Trade offs…It’s always a trade off. Everytime I interview someone for a position, I tell them I like working in a collegial team. I want to hear their ideas, and I want them to tell me when they think I’m wrong. At the end of the discussion, I expect we’ll both have learned something. There is a lot of value in perspective, and seeing the trade offs.
@groenrechts5948
@groenrechts5948 7 ай бұрын
​@@JeffZuerlein Yes, trade offs are key, but oftentimes programmers have almost religious feelings about their 'holy' language. I used to have similar feelings decades ago, so I do understand, but I simply don't share this religious point of view anymore. And, for the record, the fact that I am a native C and C++ speaker does not imply anything. I am a native Dutch speaker as well, but I don't regard Dutch as the best language in the world. Not even close. But I can order a pizza in Dutch, and I can say Groningen and Scheveningen with the correct pronunciation. That's skill you see, very hard to master, but it is not an important skill. Junior programmers can hotly debate things in terms of 'better' and 'worse', whereas they should ask a bit more the 'what is it that actually matters' question. What are the true objectives of the project? On-time delivery? Performance? Maintainability? Flexibility? Being able to run on an FPGA? You can't have it all you know. Trade off it is, and I would like to know where the focus lies before I accept a position in my virtual job interview with you. This would be a fun discussion for sure, and we both might indeed learn something. Too bad I already have the best job in the world.
Writing C# without allocating ANY memory
19:36
Nick Chapsas
Рет қаралды 152 М.
5 Rules For DTOs
17:56
Ardalis
Рет қаралды 46 М.
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН
A zero config TOR Proxy for anonymous browsing!
5:54
Mii beta
Рет қаралды 943
What is Span in C# and why you should be using it
15:15
Nick Chapsas
Рет қаралды 261 М.
T-SQL Skills: Loading Millions Of Rows Of Test Data In Seconds
11:19
Memory Arenas - Explained Simply
5:27
Nic Barker
Рет қаралды 3,8 М.
The Fastest Way to Modify a List in C# | Coding Demo
10:30
Zoran Horvat
Рет қаралды 26 М.
Google’s Quantum Chip: Did We Just Tap Into Parallel Universes?
9:34
How Thread Safety is Changing in .NET 9
10:03
Nick Chapsas
Рет қаралды 40 М.
Dependency Injection Deep Dive | .NET & C# Essentials
38:01
Amichai Mantinband
Рет қаралды 27 М.
Master the Design of Functional Types in C#
17:53
Zoran Horvat
Рет қаралды 18 М.
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН