Тёмный
Fast F#
Fast F#
Fast F#
Подписаться
Learn how to write fast F# code.

F# is a simple programming language for writing correct, robust, and performant code. You must understand how F# and .NET work under the hood to take the performance to the limit.

Join me as I teach you how to engineer your code to run in the shortest possible time. I run a series that focuses on theory and practice. These are practical walkthroughs of how to profile and optimize F# code to achieve maximum performance.
Fast F#: Abstraction Addiction
29:00
Год назад
Fast F#: Anonymous Records
17:02
Год назад
Fast F#: "Clean" Code Chat
53:16
Год назад
Fast F#: Intro to Interfaces
22:01
Год назад
Fast F#: Intro to Classes
22:23
Год назад
Fast F#: Intro to Maps
18:06
Год назад
Fast F#: Intro to Active Patterns
25:21
Год назад
Fast F#: Intro to Options
23:30
Год назад
Fast F#: 1K Subs Update
20:02
Год назад
Fast F#: Intro to Sets
12:20
Год назад
Fast F#: Intro to Loops!
18:02
Год назад
Fast F#: Mini Courses Idea
9:37
Год назад
Fast F#: Intro to Arrays
19:21
Год назад
Комментарии
@ChaoticNeutral6
@ChaoticNeutral6 25 дней назад
Decimal is NOT a floating point in the same way as floats and doubles in .net. decimal has a base 10 representation, under the hood it is literally a large int with a decimal point that can be moved. Thus within certain constraints it CAN perfectly represent decimal numbers like 0.1
@abarth0800
@abarth0800 3 месяца назад
perfectly explained thank you !
@user-fs3qr5yg7e
@user-fs3qr5yg7e 4 месяца назад
i love your channel, both f# and it feel like a gem that i have discovered.
@PaulSebastianM
@PaulSebastianM 4 месяца назад
You do not explain why Turkey cannot be created similar to Chicken. You say a lot of imperative stuff like do this, you cannot do that, etc., but you don't say WHY!? So my question to you is what is the difference and why can't you create instances of Turkey without manually adding a constructor.
@PaulSebastianM
@PaulSebastianM 4 месяца назад
.NET might allocate structs on the heap if they are larger than 16 kb or something like that. The C# docs recommend using structs for very small data structures that have no reference types inside. If they do, the struct will be allocated on the heap always.
@The2011andrey
@The2011andrey 4 месяца назад
bro great chanel wonder why you have little views. really helpful thx
@Eugensson
@Eugensson 4 месяца назад
Is it possible to host F# on baremetal?
@TheJessejunior
@TheJessejunior 5 месяцев назад
Thank you... I've been through all your introduction series... even though I have some years of experience in f#, yet I got a deeper understanding in many toppics, great work.
@TheJessejunior
@TheJessejunior 5 месяцев назад
man i'd love to see computation expressions explained by you.
@TheJessejunior
@TheJessejunior 5 месяцев назад
uowww, so many insights... I had never found units of measure very useful... until now. thank you.
@TheJessejunior
@TheJessejunior 5 месяцев назад
thank you for this series, I work with f# for a few years now, and yet I'm learning important bits here.
@ahmedreza8221
@ahmedreza8221 5 месяцев назад
Wonderful content. Only 2k views don't do justice :(
@androth1502
@androth1502 5 месяцев назад
the thing is, a lot of optimization is done by the compilers. when it comes to C, it has had decades of the smartest people working on the optimizations it does behind the scenes which is the reason it's arguably the fastest language. modern languages like rust and zig that come close to reaching C level of performance actually use the C optimization library (LLVM). for the .NET VM, it is optimized for C#, so unfortunately, F# is never going to be as fast as C# though it can get close, and the .net ceiling is well below C. i'd argue it's also below the java VM. java seems to have the most optimized VM out in the wild. you're not going to be making AAA games in F#, but for the purposes of data science, financial applications, etc. it's pretty good. i also like the language and some things it has innovated have ended up in other languages.
@manhxxo
@manhxxo 6 месяцев назад
welp, F# is more compicated asf compare to c#
@purplevincent4454
@purplevincent4454 4 месяца назад
I think F# is simpler than C#
@pr0th0masNL
@pr0th0masNL 6 месяцев назад
How do you generate that signature in the commented part? what addon is taht? my ionide for F# does not have that. :c
@mariobroselli3642
@mariobroselli3642 6 месяцев назад
I cant find any video comparing Clojure with F#. I am using Racket.
@TatianaRacheva
@TatianaRacheva 7 месяцев назад
6:06 "Instead of using the raw chicken..." 😆
@blackwiredotio
@blackwiredotio 7 месяцев назад
Was let private introduced after this? You don't need to use a private module. Just make the function private.
@samueleferrari9931
@samueleferrari9931 7 месяцев назад
I really like your beard
@samueleferrari9931
@samueleferrari9931 7 месяцев назад
Mi piace il tuo pizzetto
@alaindevos4027
@alaindevos4027 7 месяцев назад
When to use IsByRefLike ?
@vacc1001
@vacc1001 7 месяцев назад
Mixing in generic types while introducing measures and naming them both Measure has made this super confusing. I don't even know wtf was happening after a point. You might wanna rethink this lesson.
@juliankohler5086
@juliankohler5086 8 месяцев назад
You kept saying "43 million cycles per shape". It's honestly a bit confusing. I hope you take this as constructive criticism, 'cause I'm interested in F# and I feel like this channel would be an asset. But for that to be true, you have to edit your videos a little better. Add a note on screen during editing, or, an eve better approach, redo that particular section. Thanks for the interesting video.
@JamesBData
@JamesBData 8 месяцев назад
This series is great. Thanks for putting these together.
@Zatarra48
@Zatarra48 8 месяцев назад
If I make the PackWeight type private like shown, how can I expose a method which takes in PackWeight as an argument? It is not possible is it? I am talking about methods in the same project. Setting PackWeight to internal solves that, but then I am no longer forced to use the create-Function.
@odytrice
@odytrice 8 месяцев назад
Great Video, Love it.
@SergioRussoPlus
@SergioRussoPlus 8 месяцев назад
Thank you - great video. Enjoying the whole series!
@jonas1ara
@jonas1ara 8 месяцев назад
Comment for YT algorithm #fsharp
@edmaphis9805
@edmaphis9805 9 месяцев назад
The bug is gone in F# 8+.
@edmaphis9805
@edmaphis9805 9 месяцев назад
I think the ultimate pipeline data munging project that exercises virtually everything is Avent of Code.
@thuraaung3122
@thuraaung3122 9 месяцев назад
I am a newbie
@fsaldan1
@fsaldan1 10 месяцев назад
At 8:32 you created a Struct with two fields but the Struct that was created actually has four fields. Two of them are the ones you created and another two have the same names with @ appended and the same values. Why did that happen?
@fsaldan1
@fsaldan1 10 месяцев назад
Wonderful video. Very clear. Since you asked for suggestions, could you create one or more videos about dataframes, which in F# are modelled by the Deedle library?
@enirya
@enirya 10 месяцев назад
Thank you for this series. I'm working on unmanaged memory arenas in C#, and need to make a Dictionary to specifically work under those constraints and your series gave me a pretty good idea of what I want to do. I'll probably go with your earlier design where you embed the head in the backing array since that seemed plenty performant, and I can allocate an additional buffer after the backing array that I can use as a simple "heap" by combining a bump allocator and a freelist. That way all the heap items will be guaranteed to be close together and nearby the backing array which will hopefully reduce cache misses and if the "heap" space runs out I can simply resize the dictionary.
@initusnovus
@initusnovus 10 месяцев назад
Is this series folded?
@FastFSharp
@FastFSharp 10 месяцев назад
Not really. I just haven't had anything more I thought would be useful to post. If there is something you'd like me to cover, let me know.
@djongaGod
@djongaGod 10 месяцев назад
Hello, I really wanted to see GO in this chart haha
@androth1502
@androth1502 5 месяцев назад
GO is about the same level as ADA and pascal, sitting below C, C++ and LLVM based compilers and slightly above java.
@ycombine1053
@ycombine1053 10 месяцев назад
I am 100% in your camp. Clean Code has always seemed like a grift to me. At some point in my career I had built up enough practical experience to realize that my instincts were correct. Ever since, I've valued pragmatism and simplicity over dogma and over engineering. It's one of the things that drew me towards functional programming. At the end of the day it's just functions and a few core data structures (and a brilliant type system in F#'s case).
@alexk6745
@alexk6745 11 месяцев назад
Great! I wonder if that static struct will be consuming sort of twice memory for taht type from the stack? Am I right? I have a feeling that that static type already uses on a heap pointer to the dictionary and we're adding one more. Am I right or not?
@nandansharma3923
@nandansharma3923 11 месяцев назад
Thanks for putting this up. How are comments in the code are getting updated automatically?
@tullochgorum6323
@tullochgorum6323 11 месяцев назад
As others are saying, the value of abstraction is very dependent on the domain. I started out writing ecommerce sites for small businesses. In that field, even a few requests per second would have been unusual. Budgets and timescales were tight, and I was using the highest practical levels of abstraction to speed the work - because performance was a non-issue. Now I'm working on financial backtesting software that is processing billions of ticks. The performance of the code inside this super-hot loop is critical, and with a little care I've achieved improvements approaching a couple of orders of magnitude. Having a little background in C has been enormously helpful, because I have at least a hazy understanding of what's happening at the coal face. Often working with languages like Python and JavaScript, so many of today's script kiddies have entirely lost touch with the world of the CPU - with the notable exception of real-time gaming..
@havokgames8297
@havokgames8297 11 месяцев назад
How can the integers be used for something useful in the engine code - they don't have any data - do you end up packing some data into high bits of the integers or something similar?
@richardekeopara886
@richardekeopara886 Год назад
Thanks for the tutorial. I understand the concept much better than I did 👍 I really want to learn F# and have already completed a beginner's course on PluralSight. But I need to go a notch up, above the rudiments. Can you do a tutorial that teaches computational expressions, please? Cheers.
@tonikaihola5408
@tonikaihola5408 Год назад
Couldn’t you do Size: float<‘Measure> and skip defining the functions? 🤔
@torarinvik4920
@torarinvik4920 Год назад
Im a huge fan of this channel, and of course a F# fanatic(needless to say). But I have to disagree with some of what you are saying here. The reason why OOP got popular was because of two things: The GUI was taking off, and programs started to have millions of lines of code. So OOP and abstraction became the solution to the problem of managing complexity. Now we have a new problem which is that so many system are critical and the world will suffer greatly if they fail. FP is a tool that helps us write correct software. Since hardware has become faster it enables us to focus on correctness as well as fast production speed, since the world is so competitive with new features. So it's sort of like if you have a ton of money(CPU power) you can afford to spend some on a maid, and a cook, and a gardener, and a driver, and a personal trainer, jet, butler ect. But if you are poor(embedded systems?) you have to do all those things yourself meaning you won't get as much done. If you aren't writing system that are performance critical like for instance game/graphics/audio/search engines, OS/system software, file compression software, ect. Then there isn't much reason to use a data-oriented approach as it will just complicate things. Also as far as the feature your are talking about, Visual Studio has an incredibly good profiler that is really easy to use. You can easily find the hotspots in your code. And I do agree with Casey, Blow, Acton, and those guys that there are some software out there that should be a lot faster than it is. There just isn't enough incentive to make it faster.
@JonnyD000
@JonnyD000 Год назад
I saw you had an older video on using Excel-DNA. Would love to see more content on how to use it.
@torarinvik4920
@torarinvik4920 Год назад
Great video. I would say Dave Plummer -> made Windows task manager. Martin Odersky -> made Scala and contributed to the JVM. Alan Kay -> made Smalltalk, coined the term "Object-Oriented programming". Chris Lattner -> Made LLVM, Clang, Swift and working on Mojo(superset of Python). Randall Hyde -> Made assembly language popular again, and made a series of books on writing high level code while understanding what is going on under the hood. Uncle Bob -> Writer of clean code series of books. Simon Peyton Jones and Erik Meijer -> Haskell implementors and spokespersons. I also have become a big fan of Don Syme recently.
@johnm287
@johnm287 Год назад
Is this code in GitHub?
@JonnyD000
@JonnyD000 Год назад
If you're still curious about if there is an existing name for this kind of pattern, in Data Science/Machine Learning it's called One Hot Encoding.
@Noble_Savage
@Noble_Savage Год назад
I don't know F#, but this video was very enlightening, thanks!
@FastFSharp
@FastFSharp Год назад
Glad it was helpful!