Go is blazingly faster than Zig?

Поделиться
HTML-код
  • Опубликовано: 27 июл 2022
  • The super challenge of languages. Because you subbed i decided to add a couple extra languages.
    Twitch
    Everything is built live on twitch
    Twitch : bit.ly/3xhFO3E
    Discord: discord.gg/ThePrimeagen
    Editor
    All my videos are edited by Flip. Give him a follow! / flipmediaprod He is also open to do more editing, so slide deeeeeeeeep into his dms.
    Links
    Linode: linode.com/prime
    / discord
    Twitch: / theprimeagen
    Insta: / theprimeagen
    Twitter: / theprimeagen
    VimRC & i3: github.com/ThePrimeagen/.dotf...
    Keyboard (15% off, I don't earn commission): bit.ly/primeagen-adv2
    #vim #programming #softwareengineering
  • НаукаНаука

Комментарии • 691

  • @ThePrimeagen
    @ThePrimeagen  Год назад +468

    These Blazingly Fast Videos have been fun to make. Should I keep going? Should we keep making more?
    Also, we are SOOOO close to 100k subs, what should we do to celebrate?

    • @jonathanalonso6492
      @jonathanalonso6492 Год назад +15

      Write your own UI framework; call it "SmoothBrainJS".
      As for the catchline? _Blazingly fast_

    • @armandsalle8447
      @armandsalle8447 Год назад +6

      YES keep going please! That's so fun! Thank you for your content ❤

    • @armandsalle8447
      @armandsalle8447 Год назад

      Also, nice moustache 🇫🇷🥖

    • @iduran
      @iduran Год назад +4

      Yes please. Do one on Carbon!

    • @zeebs7163
      @zeebs7163 Год назад

      we should do a celebration, BLAZINGLYYYY FASTTTT!!

  • @Tesserakt8
    @Tesserakt8 Год назад +736

    I now can't look at framework repos and not laugh when I see blazingly fast.

    • @ThePrimeagen
      @ThePrimeagen  Год назад +197

      that was a goal

    • @ahmaddynugroho
      @ahmaddynugroho Год назад +3

      me too

    • @Mempler
      @Mempler Год назад +4

      @@mateusramos1742 the question is, does it "cheat" and interop with C/++/rust/zig or is it purely written in go?

    • @mateusramos1742
      @mateusramos1742 Год назад +2

      @@Mempler purely written in go.

    • @whoami5955
      @whoami5955 Год назад +4

      Blazing fast

  • @striderstache99
    @striderstache99 Год назад +87

    You and Fireship are my favorite code content creators. Funny and thorough. Need more of this on RUclips.

  • @DiegoVallejoDev
    @DiegoVallejoDev Год назад +200

    As a professional node developer I 100% agree, Node is not meant to be super fast and be used on the most crowded/critical endpoints of the application, it has more to do with fullstack's fairly new role in the industry.
    In the old days companies had front-end and back-end teams that probably never met each other, they would have an internal documentation site with most of the information they needed and at the last steps of the waterfall chain the software it will run mostly fine, but we're talking months of development with no progress being seen by the no-code folks who control the money.
    In current times the market demands software built faster and progressively, the "no-code folks" want to ensure the feasibility of the project as soon as possible, so we changed to agile methodologies and the fullstack role emerged
    A developer capable of handling the 4 elements, front-end, back-end, database and whatever the client wants
    and he has to do it fast, so changing between technologies might not be a good idea - I would say that's pretty stressful in the long therm and can lead to burnout,
    to mitigate stress and bugs they use the same languages for back-end, front-end and DBmgnt
    like any business in a free market if they require an specific an team is required for a "blazing fast" backend they will have it but those are very specific cases, 90% of services would not have a significant workload nor care for a 200ms response, and if they do they'll probably scale horizontally or distribute copies across the world.
    that's the software reality:
    development time is more important than performance time

    • @nivethan_me
      @nivethan_me Год назад +35

      Best argument for node i have seen in a while. I'll save this and going to use this forward 😂

    • @hypergraphic
      @hypergraphic Год назад +21

      Yeah, I mean, how fast does Node have to be? 500 requests per second is not nothing. If Ruby on Rails is performant enough for a lot of use cases, I'm sure Node is too.

    • @pedrolarosa
      @pedrolarosa Год назад +2

      Agree. Thanks for sharing!

    • @markhaus
      @markhaus Год назад +12

      @@hypergraphic that’s what load balancers are for. Just increase the number of node nodes

    • @Justin-fq8dt
      @Justin-fq8dt Год назад +10

      At the end of the day it really isn't a huge deal to use a different language for the backend and still use js/ts on the frontend. Most developers who have been programming for a couple of years probably know js and another language that can be use for backend services, and wouldn't have a problem switching between languages frequently while developing their own full stack project or while working as a full stack developer at a company. I think one of the notable advantages of node is for new devs who want to be able to work on both a frontend/backend of their own software while only knowing one language.

  • @ShubhamRao
    @ShubhamRao Год назад +190

    While I'm waiting for Elixir, it would be interesting to also explore these numbers on a multicore machine! (Both performance and developer ergonomics)

    • @ThePrimeagen
      @ThePrimeagen  Год назад +111

      you people and elixir

    • @MarcosVMSoares
      @MarcosVMSoares Год назад +36

      Elixir is life, elixir is Brazil ^^

    • @cherryramatis2508
      @cherryramatis2508 Год назад +12

      @@MarcosVMSoares elixir é nois

    • @Roupi
      @Roupi Год назад +17

      @@MarcosVMSoares elixir é agro, elixir é pop, elixir é tech, tá na globo é elixir.

    • @nivaldolemos5280
      @nivaldolemos5280 Год назад +18

      @@MarcosVMSoares elixir is from brazil, lua is from brazil, come to brazil

  • @timhoeppner6691
    @timhoeppner6691 Год назад +1

    I'm really enjoying these benchmark style videos, keep up the good work!

  • @Voidstroyer
    @Voidstroyer Год назад +112

    I'm looking forward to that Elixir video. I am really curious to see how it's performance stacks up against Go and Rust.
    Also, If I recall, in that video you did with Theo regarding unit testing, both of you agreed that you shouldn't touch Elixir and I am curious as to why. I understand that both of you are really picky regarding languages and their type systems, but I feel that Elixir has ways around its dynamic types that in many ways are either similar to typescript, some ways a bit worse, and in some ways a bit better (pattern matching on specific values and types). And Elixir has certain tools such as elixir_ls and dialyzer that help as well to make error detection during development easier.

    • @Sairysss1
      @Sairysss1 Год назад +13

      For people who are interested in Elixir, here is a comparison between Erlang and Go performance: www.dcs.gla.ac.uk/~trinder/papers/sac-18.pdf
      Elixir is based on Erlang's BEAM virtual machine so it should be pretty much the same.
      To summarize: Erlang/Elixir can spawn processes faster, but Go has better throughput than Erlang/Elixir and in general Go is more performant.
      But keep in mind that Erlang/Elixir is not all about performance, it's main strengths are fault tolerance and reliability. In that regard its much better than Go.

    • @qx-jd9mh
      @qx-jd9mh Год назад +2

      @@Sairysss1 just call Rust through a NIF when you need to speed up Elixir

    • @LtdJorge
      @LtdJorge Год назад

      @@qx-jd9mh it depends on the type of work. Many small function calls would probably be slow due to the overhead of calling to the NIF.

    • @qx-jd9mh
      @qx-jd9mh Год назад

      @@LtdJorge did you actually look at benchmarks that compare the overhead of nifs?

  • @Eysvar
    @Eysvar Год назад +46

    I don't know whether to be proud or ashamed that as soon as Prime showed the Go code, I immediately noticed it wasn't formatted with gofmt.

    • @ThePrimeagen
      @ThePrimeagen  Год назад +65

      it wasn't. I accept the fact that i hate the formatting and i am the only one using the repo, so suck it.

    • @avithedev
      @avithedev Год назад

      @@ThePrimeagen finish him 😂

  • @galileo_rs
    @galileo_rs Год назад +3

    It is rare to find a video on RUclips that you do not have to watch at 1.5x.

    • @ThePrimeagen
      @ThePrimeagen  Год назад +2

      I try to get to the point. I'm just so sick of videos that are just the most slow roll pieces of content ever.

  • @bryanenglish7841
    @bryanenglish7841 Год назад

    I love watching these experiments. I keep meaning to make my own video about this but they taker forever to make. I admire your commitment.

  • @marctse3556
    @marctse3556 Год назад +15

    I came here with blazingly fast speed after the notification

  • @lallenfrancisl
    @lallenfrancisl Год назад +51

    Programming entertainment at its peak. Dude your videos are hilarious and super information packed at the same time

  • @PsychoKiller250
    @PsychoKiller250 Год назад +6

    Another banger of a video prime, but a have a question, when the OG of backend languages Java will be tested against node to see which is the slowest language of them all?

  • @moitoius
    @moitoius Год назад +8

    Lock-free is like async/futures/promises. It tends to scale well horizontally (more threads and cores), but does worse per-core - especially if there is a lot of contention on the resource. The new thing is wait-free data structures that are not only lock-free, but also avoid long compare-and-swap loops.

    • @ThePrimeagen
      @ThePrimeagen  Год назад +14

      wait free... I am getting too old for this shit

    • @cenowador
      @cenowador Год назад

      This is interesting... But how does one achieve await free in node? Everything in there is a Promise

    • @moitoius
      @moitoius Год назад

      @@cenowador this doesn't apply to node at all.

  • @Pbertrand_dev
    @Pbertrand_dev Год назад +12

    Nice benchmark and amazing 11/10 mustache!
    Dare you to do a benchmark using PHP 8 and Swoole

  • @LeszekZalewski
    @LeszekZalewski Год назад +5

    Multicore machine is one thing, comparing the memory usage would be another - especially if you built it in a way to compare GC performance (or lack of it)

  • @buraky16
    @buraky16 Год назад +1

    This video's thumbnail (gopher licking bun with crazy eyes) is my current favorite developer meme. I can't help it, it's just so funny :D. Also wherever a tech community mentions "blazingly fast", that sound effect plays in my mind automatically lol

  • @jsimonlarochelle
    @jsimonlarochelle Год назад +14

    Nice analysis. I'm not a fan of Go. The syntax is weird (I think they worked too hard not to look like Java). However, ..., GOs benchmark would have looked better on a multicore CPU which is what most PC are running except maybe on small embedded systems. If I am not mistaken, GO (like Java) uses a tracing GC and this will usually run on a separate thread and if this thread can actually map to an actual separate core then you get your memory management running in parallel. That is why languages and/or runtimes that use something like a tracing GC are normally very good for high throughput software on appropriate hardware. Whereas things like Python, Swift, ... which use a reference counting based memory manager, or Rust, Zig and others where you manually manage your memory will (in common implementation) actually trace the heap and manage memory on the same thread that is executing your code (except for a thread to manage circular references in Python, Swift, ...).
    On a single core, the tracing GC will still use an additional thread (at least one) but this will grab execution time from the single core and still involve context switching between the treads whereas Zig and Rust will not have this.
    So ... if you love GO's syntax and your not running your software on a hand held calculator chip, you will get good productivity and good performance.

  • @MohitDodhia
    @MohitDodhia Год назад +4

    Hello, Prime! I love these videos. I was wondering if a Java vs Node vs Go vs Rust video is in the pipeline or not? Nonetheless, have a nice coconut-oily day!

  • @uchennaofoma4624
    @uchennaofoma4624 Год назад

    You videos always have a way of making me laugh. Thanks 😀

  • @andreagiorgi3512
    @andreagiorgi3512 Год назад +14

    It's really mind boggling how people could think a pure interpreted language can be fast like a compiled one. The difference between them, what assembly and machine language are, these are literally among the first things you learn at university during a basic computer engineering course... How in the hell could someone think a language, like Javascript, which uses strings in switch-case statements can be "fast"?

    • @steveoc64
      @steveoc64 Год назад +10

      Because even JS gets compiled to machine code at runtime.
      The slowness comes from dynamic types and gc

    • @LtdJorge
      @LtdJorge Год назад +8

      If it hits the JIT, it’s machine code

    • @TheWallReports
      @TheWallReports Год назад +4

      💯Exactly. I was thinking the very same thing. Node/JS is blazingly fast when compared with other [interpreted] languages of the same class like Python, PHP, Perl etc. Context matters. It's one of the fastest interpreted languages available. The only language I recall in the interpreted class that beats out Node/JS is Lua. But to pit it against a compiled or even byte-code compiled language like say Java is ludicrous. It says more about the people making such argument than the merits of test. It's like arguing a Crown Victoria can hold it own against a F1 race car.🤷🏾‍♂

    • @peezieforestem5078
      @peezieforestem5078 Год назад

      It's actually trivial to imagine, if, say, an interpreted language has multithreading and asynchronous features, where's compiled language doesn't.

  • @moumous87
    @moumous87 Год назад +1

    Love these videos!

  • @unowenwasholo
    @unowenwasholo 10 месяцев назад +1

    You had me at "Miku with a rocket launcher"

  • @chris-ew9wl
    @chris-ew9wl Год назад

    Love the videos man, especially the last part about frontend stuff 🤣

  • @sammysheep
    @sammysheep Год назад +1

    For Go vs Rust and Go being more ergonomic, is it the borrow checker vs GC that hampers things or is it async Rust vs the built in Go concurrency engine that makes Rust more difficult in particular?
    I think the difficulties of both will improve in Rust over time, but likely the borrow checker has more constraints to evolve than evolving async Rust does.

  • @shubhamlatiyan7972
    @shubhamlatiyan7972 Год назад

    love this dude, amazing content

  • @davidraymond8994
    @davidraymond8994 Год назад +3

    I am a bit surprised at Rust versus Go I would have thought they would be a bit closer. I really like Rust but I am using Go for a new project because I couldn't really get up to speed quick enough with Rust.

  • @BeardedWrenchh
    @BeardedWrenchh Год назад +1

    been waiting weeks for this video, LETS GO

    • @ThePrimeagen
      @ThePrimeagen  Год назад +1

      was it worth it?

    • @BeardedWrenchh
      @BeardedWrenchh Год назад

      @@ThePrimeagen definitely worth the wait, i will note, i expected Go to do a little better than it did, It also would be cool to rerun these tests on a multi-core server and compare the differences

  • @bendotcodes
    @bendotcodes Год назад +49

    You forgot to mention that Go has an insane concurrency model with go routine. It makes building multi threading code 1000% easier. To me this is the big selling point. I would be curious to see the benchmark with more vCPU. Were you on only 1?

    • @anomaliespatiale6023
      @anomaliespatiale6023 Год назад +4

      I’m an absolute beginner with Go but was thinking the same thing. Maybe the experiment’s parameters are not a good fit for the concurrency model of Go?

    • @steveoc64
      @steveoc64 Год назад +18

      You will find that zig and rust do the same thing as go … async frames (coroutines) spread over cpu cores using a thread pool.

    • @bendotcodes
      @bendotcodes Год назад +3

      @@steveoc64 Oh didn't knew about that, thanks for sharing! I know nothing about Rust maybe it's time to get my hand dirty 😅.

    • @steveoc64
      @steveoc64 Год назад +11

      @@bendotcodes rust does it via 3rd party packages - Tokio. Zig has it built into the stdlib, where it’s a bit easier to find and follow the code. It’s encouraged ( idiomatic even ) to roll your own custom event loop based on the stdlib example.
      I’ve been doing go professionally for just on 7 years now, but I never really understood the internals of how goroutines work, until learning zig. It’s awesome for that.

    • @SimonBuchanNz
      @SimonBuchanNz Год назад +7

      @@steveoc64 it's weird to say "you need third party packages", when Rust put a lot of work into making the native async code work completely customizably. It's not "you need to", it's "you get to". Keep in mind, this same system works when you're building a kernel, or in a 1kB ram microcontroller.
      Although I wouldn't recommend it (for performance), it's not even that hard to implement an executor, it's logically just a queue of work to do and a way to go to sleep and wake up.

  • @blazinglyfast1233
    @blazinglyfast1233 Год назад +1

    Great channel. Love your content

  • @TheHellishFrog
    @TheHellishFrog Год назад +2

    I did much simpler tests - like counting to one billion in a cycle - the (best) results: Node-Js = 11.5 sec, Bun = 12.0 sec, Go=5.7 sec, Java=5.2sec, Rust=110nano, Zig=52nano, Python - some ten minutes :). All code variants were written as simply and close to the basic example as possible, compiled, and optimized for speed. All tests were running on the same laptop i7 Ubuntu 22.

  • @kevinzunigacuellar
    @kevinzunigacuellar Год назад

    love your videos man!

  • @idylls
    @idylls Год назад +4

    What are your thoughts on the ergonomics of async Rust? Personally, for me it's bad enough to push me towards using Deno for most web-y things, but I would really like to go "all-in" on Rust.

    • @ThePrimeagen
      @ThePrimeagen  Год назад +2

      i really don't mind it. it takes a moment to get use to, but once you do, its pretty straight forward.

    • @hogstudio4819
      @hogstudio4819 Год назад

      If you don't mind Boxing, I'd say

  • @TheBli7krieg
    @TheBli7krieg Год назад

    dude! the intro, I was almost choking

  • @prestonrasmussen1758
    @prestonrasmussen1758 Год назад +3

    I’m not familiar enough with the V8 JIT compiler to know exactly when it kicks in. I’m curious if you know whether or not the JS code would have been compiled to bytecode by the time you collected data? There will definitely be a significant performance difference between the interpreter executing the JS code while it’s warming up, and after the JIT compiler kicks in and bytecode is being executed instead.

    • @ThePrimeagen
      @ThePrimeagen  Год назад +5

      so for small functions it is ~1 - 3 runs, large functions (1000+ chars) it tends to be 7 - 15 (all depending on size).
      All code was jitted within the first couple requests.
      :)

    • @prestonrasmussen1758
      @prestonrasmussen1758 Год назад +1

      @@ThePrimeagen awesome, thanks for the info!

  • @brilliantdirectoriestraining
    @brilliantdirectoriestraining Год назад +1

    This is the video we wanted, and the video we needed.

  • @superhoops540
    @superhoops540 Год назад

    would love to see the same benchmark testing in Nim :)

  • @AaronMartinColby
    @AaronMartinColby Год назад +2

    I may have missed it from the live stream or an earlier video, but were you using the standard http library or fasthttp for Go?

    • @ThePrimeagen
      @ThePrimeagen  Год назад +3

      good questions! I just followed the GIN guide.

    • @AaronMartinColby
      @AaronMartinColby Год назад

      @@ThePrimeagen Go Fiber is basically ExpressJS for Go and uses fasthttp under the covers. Brings it to within 25% of Rust, at least with my tests using Actix. Gnet is apparently faster but I have not yet used it. Very interesting, though.

  • @LuccDev
    @LuccDev Год назад

    Do you have any good light themes recommendation for neovim ?
    Cool video too ;)

  • @edcoronado
    @edcoronado Год назад

    Great video! I’m curious about how Deno would stack up against these

  • @wlockuz4467
    @wlockuz4467 Год назад +9

    Would be interesting to see something similar with JS (node) vs Python.

    • @dandymcgee
      @dandymcgee Год назад +6

      They're both so blazingly slow that the profile would never finish and there would be nothing to report.

  • @caiofelix623
    @caiofelix623 Год назад +18

    hey prime, what do you think about make a video benchmarking go versus java (using quarkus or springboot as it framework)?

    • @ThePrimeagen
      @ThePrimeagen  Год назад +20

      i just wont do java. sowwy :(

    • @whorudra
      @whorudra Год назад

      You hate java?

    • @__idan__
      @__idan__ Год назад +1

      I can contribute a spring boot version

    • @DiegoVallejoDev
      @DiegoVallejoDev Год назад +5

      @@ThePrimeagen admirable,
      a man of principles refusing to go into the java path

    • @DiegoVallejoDev
      @DiegoVallejoDev Год назад +3

      @@ThePrimeagen but what about Kotlin?

  • @tomasvallotton9264
    @tomasvallotton9264 Год назад +2

    @ThePrimeagen Next time you have trouble getting rid of a mutex try using a local executor instead of a multithreaded runtime, that way you can use a non atomic async mutex, and you can use a thread local instead of a lazy static.

  • @fedevile
    @fedevile Год назад +1

    I'd love to see the same tests in a multicore system, my guess is go would shorten the difference somewhat with rust/zig

  • @scottb4029
    @scottb4029 Год назад

    Prime , do you have any recommendations for videos or books for learning go?

  • @nunofontes3895
    @nunofontes3895 Год назад

    Nice videos, keep them coming.

  • @philiposdrontzas3725
    @philiposdrontzas3725 Год назад

    I would be quite interested into a comparison between those and Ruby on Rails. Very nice video!

    • @ThePrimeagen
      @ThePrimeagen  Год назад +7

      ty. I probably will never touch the gem encrusted sword

    • @philiposdrontzas3725
      @philiposdrontzas3725 Год назад

      ​@@ThePrimeagen Oh ok, thanks! , although could still be worth wielding it haha

  • @Omikronik
    @Omikronik Год назад +1

    I love your thumbnails

  • @krige
    @krige Год назад +2

    Could you share the source code of this experiment? I would like to replicate it in Java

  • @hivemind9643
    @hivemind9643 Год назад +9

    I actually would love to see your take on Svelte. Looking forward

    • @AlexandreAbreu1
      @AlexandreAbreu1 Год назад

      This is a backend benchmark, Svelte is used in fronted. Doesn't make sense

  • @MOON9FLY
    @MOON9FLY Год назад +3

    I love you editing XD, Good video as usual

    • @ThePrimeagen
      @ThePrimeagen  Год назад +5

      Its the editor that does all the good moves. I am just the good looking model.

  • @grantwilliams630
    @grantwilliams630 Год назад +10

    Zig actually has some pretty good container implementations in its stdlib

  • @kylegaijin
    @kylegaijin Год назад +2

    Yes, Keep making cool videos. And... I guess that zig is going to be the fastest in this video.

  • @elvor8512
    @elvor8512 Год назад +2

    I’m not sure I really understand the method of this experiment, could somebody explain in a bit more detail? How does an increasing size of the queue mean faster speed? (the method in the rust vs bun vs node video with requests/second made more sense to me, at least)

  • @eventslooped7376
    @eventslooped7376 Год назад +1

    Can you throw in some classic for comparison? Like C# and Java?

  • @DiegoVallejoDev
    @DiegoVallejoDev Год назад +1

    It's time for a collaboration with Dave Plumber

  • @MrR8686
    @MrR8686 Год назад +1

    any more zig videos? it would be nice to see you try out more languages

  • @quachhengtony7651
    @quachhengtony7651 Год назад +26

    I would like to formally request a video on C# vs Go

    • @ThePrimeagen
      @ThePrimeagen  Год назад +29

      i will literally never do c# :)

    • @senpos
      @senpos Год назад +3

      @@ThePrimeagen Why not? You don't like the .NET / Microsoft ecosystem? The language is too... "fancy" / Java-like? .NET Core seems to be blazingly fast!

    • @betajoudi1440
      @betajoudi1440 Год назад

      @@ThePrimeagen 😂😂

    • @quachhengtony7651
      @quachhengtony7651 Год назад +1

      @@ThePrimeagen Can you tell me why?

    • @200KGHantel
      @200KGHantel Год назад +2

      @@quachhengtony7651 +1

  • @grantwilliams630
    @grantwilliams630 Год назад +19

    I think elixir is a pretty good language for simple request handling. (It’s kinda garbage for actual computation though)

    • @ThePrimeagen
      @ThePrimeagen  Год назад +13

      i know nothing about elixir, we will see

    • @verified_tinker1818
      @verified_tinker1818 Год назад +6

      @@ThePrimeagen You'll love it! It's an incredibly fun language; a mix of Erlang, Ruby, Haskell, and I think even a bit of Prolog.

    • @harleyspeedthrust4013
      @harleyspeedthrust4013 Год назад +11

      @@verified_tinker1818 what a rollercoaster. I pooped when you said ruby and splooged when you said haskell

    • @luccahuguet
      @luccahuguet Год назад +2

      @@ThePrimeagen do Julia too sometime!

    • @js-ny2ru
      @js-ny2ru Год назад +1

      @@ThePrimeagen Check Elm also.

  • @driden1987
    @driden1987 Год назад +1

    I laughed at node's intro, well played

  • @pjf7044
    @pjf7044 Год назад

    What actually makes a language faster than another ? I mean what is actually going on that allows it to make the most use of its environment (software or hardware?) to execute the instructions faster? Or is it actually due to the language executing instructions more efficiently due to a smarter/optimized process flow?

  • @fabienpenso
    @fabienpenso Год назад +22

    You should definitely add memory usage for each on top of speed performance. Memory has a higher cost than when we used bare metal servers, and it adds up quickly. Rust has massive pros for that compared to go and even more to node.

    • @steffen2592
      @steffen2592 Год назад +1

      True. We have a Java server solution and CPU usage was never the problem, RAM is the issue.

  • @ryanseipp6944
    @ryanseipp6944 Год назад +10

    Really want to see what happens when you go multi-core. I'd imagine rust/zig/go would pull away further but would highlight differences in how they handle concurrency across cores.

    • @ThePrimeagen
      @ThePrimeagen  Год назад +8

      correct, i would have to come up with a multicore strat with node first

    • @ryanseipp6944
      @ryanseipp6944 Год назад +5

      @@ThePrimeagen potentially multiple instances of the node server equal to number of cores and hit them on different ports

    • @BosonCollider
      @BosonCollider Год назад

      If you need parallelism, Rust will likely win, simply because it is written specifically for the fast-multithread-code usecase.

  • @SportSync_official
    @SportSync_official Год назад +1

    How do you like your keyboard, and how do you manage vim with dvorak like the positions of the keys.

    • @ThePrimeagen
      @ThePrimeagen  Год назад +3

      love the keyboard
      managing key positions? Its the same thing as qwerty, just different positions.

    • @SportSync_official
      @SportSync_official Год назад +4

      @@ThePrimeagen Yeah but vim is designed with qwerty in mind so isn't "ideal" to press j & k or l & h (and any other vim command) on dvorak like it is on a qwerty keyboard.
      So do you remap your keys or did you just learn vim on dvorak?
      (sorry for the odd question)

  • @godDIEmanLIVE
    @godDIEmanLIVE Год назад +1

    You mind taking a look at Nim? Seems to me to be the Ring to rule them all.

  • @thebrowhodoesntlift9613
    @thebrowhodoesntlift9613 11 месяцев назад +1

    Bro really went:
    Zig 🏃💨
    Go 🏃💨
    Node 🤨

  • @andrewdunbar828
    @andrewdunbar828 Год назад +6

    Just what I would've expected. But I wonder how managed languages like Java and C# compare to Go. I'm guessing they'd be neck and neck but between Node and Go.

  • @vercolit
    @vercolit Год назад +2

    Hey, it would be interesting to see how much performance you can etch out with C over rust and zig. Maybe even assembly, to see how much faster it can get over C? I know that I get better performance over even C++ when I use C, because I tend to write much simpler code that is way less abstract.

    • @peezieforestem5078
      @peezieforestem5078 Год назад

      That's not really language's fault, you can write everything you write in C in C++, in fact, I'd argue C-style C++ should be your default, only using advanced C++ features when really necessary.

    • @marcossidoruk8033
      @marcossidoruk8033 11 месяцев назад

      Zig and C would probably be equally fast if written correctly, language is not the main concern, the optimizations made by the programmer are and both of these languages are extremely flexible and designed so that you can optimise your code as much as you want.
      Rust on the other hand makes it demonstrably harder to optimise, if you already fight the borrow checker writing naive implementations you are going to be fighting it 100x when optimising. Refactoring is also harder in (idiomatic) Rust because everything is sort of encapsulated into traits and some things in your code are executed implicitly and thus it is harder to reason and change te behaviour of the program. Also forget about RAII, that is something that will make everything 100x slower and if you do memory pools that you manage yourself then there goes the borrow checker.
      So yeah, idiomatic Rust would probably be a lot slower than optimised C and Zig, if you want real high performance Rust shouldn't be your first choice.

    • @marcossidoruk8033
      @marcossidoruk8033 11 месяцев назад

      ​​@@eleanorbartle53541. If you write the assembly with care it will be faster, you just need to know what you are doing.
      2. clang isn't the best C compiler, that is gcc wich does not use LLVM and produces code that is equal or faster to clang in 90% of the cases, sometimes significantly so. Also Rust wound most likely be significantly slower.

  • @jackscheffel1509
    @jackscheffel1509 Год назад +3

    Prime -- have you checked out Nim? I would be interested to see how you feel about it and what you think about the DX.

  • @wety789
    @wety789 Год назад

    The no compliments for node really got me 😂

  • @jakobbouchard
    @jakobbouchard Год назад +1

    The first time I learned about Zig was when I looked at ncdu's page. ncdu 2.0 uses it instead of C, which is interesting

    • @peezieforestem5078
      @peezieforestem5078 Год назад +2

      Zig is just a superior C, even if all you do is use it as a compiler. Just the build system alone is worth it.

  • @arcanernz
    @arcanernz Год назад

    I’ve seen a lot of RUclipsrs but ThePrimeagen is the most blazingly fast one.

  • @Luuucaa
    @Luuucaa Год назад

    Excited for the Elixir vid

  • @hipnotickid12
    @hipnotickid12 Год назад +1

    I've seen the whole video but now I just mostly come back for 0:00 - 0:14. Cracks me up every time.

    • @ThePrimeagen
      @ThePrimeagen  Год назад +1

      It is the greatest intro that has ever happened

  • @fitzgerald1337x
    @fitzgerald1337x Год назад +1

    i would love to see Deno vs Node vs Bun. the JavaScript space needs a new back-end king!

  • @hck1bloodday
    @hck1bloodday Год назад

    That silence afer saying node got me, jajajajaja

  • @madsxcva
    @madsxcva Год назад

    I wish this also had a language that was actually used in the industry to see how these flavor of the month languages (except node) compare to them and if its worth actually learning them

    • @andrewrobie620
      @andrewrobie620 9 месяцев назад

      Both Rust and Go are used extensively in the industry though? Sure they're not at Java/Python levels of adoption, but they're well past flavor of the month.

  • @mpldr_
    @mpldr_ Год назад

    I like the Gopher from the thumbnail who vomits an upside down Nike logo at a bun

  • @zuzuz18
    @zuzuz18 Год назад

    Sllllurpin up the content

  • @Roupi
    @Roupi Год назад

    so if you will go to the trouble of doing elixir, you could take the chance and compare it with ruby (for the same purpose you have node in this comparison, show how it is slow in a scale).
    it would be even better to have a ruby and node comparison.

  • @_thehunter_
    @_thehunter_ Год назад

    comparison was fair enough

  • @arminrosic9550
    @arminrosic9550 Год назад

    Thank goodness you mentioned Elixir at the end … the whole time I’m thinking … I suspect Erlang/Elixir could crush this, especially on multi-core machine

    • @LtdJorge
      @LtdJorge Год назад

      Erlang would never be able to beat Rust, but you could have distributed servers working as one and 9 9s of reliability basically for free. Not so much in Rust.

    • @js-ny2ru
      @js-ny2ru Год назад

      He should use muli-core machine with Node also. That's where he shine. He keep testing it wrong...

  • @Cookie-mv2hg
    @Cookie-mv2hg Год назад

    I lost it in Node....`silence`...`blinggg effect`

  • @act0r399
    @act0r399 Год назад +1

    I don’t see yet video, but I think that Zig is blazingly fast😃

  • @andredasilva6807
    @andredasilva6807 Год назад +1

    love the intro. node...

  • @caseyclayton01
    @caseyclayton01 Год назад

    I've caught myself using blazingly fast at work, so thanks for that. Not in a serious context, we primarily use Rails and Elixir.

  • @eheh5748
    @eheh5748 Год назад +2

    I love how I know how to make a Message Queue now thanks.
    (I'm about to steal your job eheheh)

  • @adityasrivastava7504
    @adityasrivastava7504 Год назад +1

    Prime can you throw in java / c++ in this test bench. Please ?

  • @Makymeet
    @Makymeet Год назад

    Yeah let's run some blazingly fast code in the browser

  • @n0kodoko143
    @n0kodoko143 Год назад +2

    Zig is gaining some traction

  • @TheSulross
    @TheSulross Год назад +1

    Go is probably adequate for most server oriented apps - there are a lot of scenarios that the garbage collection overhead just comes out in the wash and is not a big deal. Manual mem mgt is where need deterministic behavior (embedded, OS kernels, device drivers, IoT, maybe ML) and where don't want significant overhead of an embedded runtime
    (e.g., Zig has no required runtime)

    • @ArnabAnimeshDas
      @ArnabAnimeshDas Год назад

      But in the long term switching to bare metal languages will save a lot of infrastructure costs.

  • @mertgokbulut8676
    @mertgokbulut8676 Год назад

    I have really enjoyed the video and would actually wanna take a look at the codebase. Not that I do not believe you but it would be nice if you can provide the source code. Amazing content, already waiting for the next one to come 😋

  • @piecodez5584
    @piecodez5584 Год назад

    Loved the intro XDXD

  • @Big_bangx
    @Big_bangx Год назад

    Really really fast ain't enough ...
    I want BLAZINGLY FAST

  • @cryptic1692
    @cryptic1692 Год назад

    I love the script kiddies roast

  • @vfryhn2
    @vfryhn2 Год назад +6

    Would you do a comparison with c++?, it would be interesting to see how different it is from rust in terms of performance

    • @DiegoVallejoDev
      @DiegoVallejoDev Год назад +3

      Rust is like 90% - 95% the performance of C++ they both are so fast it doesn't really matter for most of developers

  • @diegolikescode
    @diegolikescode Год назад

    NODE. (Uncomfortable silence)

  • @halfman58
    @halfman58 Год назад +1

    LOL you said it at the end... Please do the same thing for Elixir or Erlang if possible :) Love you vids...

  • @civetbutlemonbutmouse6087
    @civetbutlemonbutmouse6087 9 месяцев назад +2

    going into this i predict zig

  • @abuk95
    @abuk95 Год назад +3

    I wonder if Nim is blazingly fast as well, compared to Zig and Go!