Solving Rust’s biggest problem

Поделиться
HTML-код
  • Опубликовано: 26 июн 2024
  • Unveiling the most significant improvement to the Rust compiler yet. Witness how Rust is overcoming it's compilation hurdles and solidifying its position as a top-tier programming language.
    Free Rust cheat sheet: letsgetrusty.com/cheatsheet
  • НаукаНаука

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

  • @letsgetrusty
    @letsgetrusty  4 месяца назад +4

    📝Get your *FREE Rust cheat sheet* :
    letsgetrusty.com/cheatsheet

  • @OrbitalCookie
    @OrbitalCookie 4 месяца назад +153

    Slow build aren't because of rust "carefully checking the program". You can use "cargo check" and see how fast that is. It's slow because of colossal pile of unoptimized intermediate code it dumps on LLVM and says "here buddy, have fun, I know you are good at this". Problem is exacerbated by any use of generics or smart macros. Try to use small alternatives for clap and serde_json, and you will see huge improvement to compile times.
    Since this comment has blown up, this was what I remembered from the olden rust days. Now there is MIR representation in the compiler with possible optimizations before the LLVM.

    • @ITSecNEO
      @ITSecNEO 4 месяца назад +8

      "unoptimised IR Code" 😂 Well tell that to the compiler team and see their reactions xD

    • @ME0WMERE
      @ME0WMERE 4 месяца назад +31

      @@ITSecNEO It _is_ unoptimised. That's kind of the point. LLVM is the one optimising it, not the front end

    • @OrbitalCookie
      @OrbitalCookie 4 месяца назад +12

      @@ITSecNEO Well this is nothing new to them, it was a design decision from the start to leave optimisation to LLVM

    • @naturalworm
      @naturalworm 4 месяца назад

      Way to sneak "unoptimised ir code" code in there. I doubt the rust proj homies would let that slide.

    • @letsgetrusty
      @letsgetrusty  4 месяца назад +1

      Good point! I didn't mean to imply that checking the program for correctness is the only or even most significant reason for long compile times

  • @MichaelZimmermann
    @MichaelZimmermann 4 месяца назад +241

    0:50 "when people complain about slow builds, they're almost always talking about the slow release build" Do you have a source for that? Because it surprises me a lot. I only care about debug build times because they need to be done often. Release builds are done rarely and run in CI so I don't really care how long they take.

    • @7Dev.
      @7Dev. 4 месяца назад +3

      Tal cual pibe, tenes razon

    • @binary_gaming113
      @binary_gaming113 4 месяца назад +26

      This! I was gonna write the same comment, I couldn't agree more.

    • @kevinmcfarlane2752
      @kevinmcfarlane2752 4 месяца назад +2

      Yes, I thought that was odd too.

    • @LtdJorge
      @LtdJorge 4 месяца назад +1

      Yes, I’m doing API dev with Tokio, Diesel (async), bb8, Axum, etc and the compiles every time I change something are pretty long, for compiling with 32 threads and linking with mold.

    • @legeorgelewis3530
      @legeorgelewis3530 4 месяца назад

      This video is terrible. full of misinformation

  • @pcfreak1992
    @pcfreak1992 4 месяца назад +281

    Sure it takes long to compile, but do you rather scroll Facebook waiting for the build to finish or do you want to chase a bug down a rabbit hole, trying to figure out why some variable is undefined?

    • @Virtuoso883
      @Virtuoso883 4 месяца назад +58

      Well when you put it like that, i prefer to chase a bug down a rabbit hole.

    • @shinobuoshino5066
      @shinobuoshino5066 4 месяца назад +29

      Ah yes, the most obscure and most impossible to fix bug: undefined variable.

    • @OrbitalCookie
      @OrbitalCookie 4 месяца назад +4

      Hey where is the excitement of all the busy work figuring out why undefined is not an object or a function? Where is the glory putting out fires of our own creation? You are no fun.

    • @jayrulez
      @jayrulez 4 месяца назад

      Are those the only 2 options?

    • @vaisakhkm783
      @vaisakhkm783 4 месяца назад +3

      Facebook... old man detected...

  • @weirdalchemy
    @weirdalchemy 3 месяца назад +9

    "Eats personal time" No shot I'm letting compile time eat my personal time. Shit compiles on the clock.

  • @perfectionbox
    @perfectionbox 4 месяца назад +45

    instead of rustc the compiler could have been called crust 🤣

    • @jongeduard
      @jongeduard 4 месяца назад +1

      Good point. :P Maybe a great name for the Crablang fork? 🦀 :P

  • @adsick_ua
    @adsick_ua 4 месяца назад +73

    "compilation time decreased from about ten seconds (9.57)
    to about eight seconds (8.28)"
    you sound like it's 2 sec improvement whereas it's actually 1.29 sec, dude. don't be like that, off by 47%

    • @paladynee
      @paladynee 4 месяца назад +6

      hah, not even a single order of magnitude. such precision is not needed. i was off by 1e1e15 once.

    • @ZoeSoutter
      @ZoeSoutter 4 месяца назад +2

      The exact values are 1.29 seconds, but he likely rounded both figures before subtracting.
      I'm not saying you're wrong, I'm just saying he isn't really either

    • @letsgetrusty
      @letsgetrusty  4 месяца назад +4

      Fair points, not the best example to showcase this feature

  • @isaaclyman8024
    @isaaclyman8024 4 месяца назад +18

    They should rewrite the compiler in Rust. Then it would be super fast and completely memory sa-*I walk face first into a sliding glass door*

    • @jongeduard
      @jongeduard 4 месяца назад +13

      Huh? Well, it already is written in Rust. In the long ago past it was written in OCaml (also a great language by the way), but nowadays Rust is obviously compiling itself, like a proper compiler should always be able to do.

    • @cernilia3211
      @cernilia3211 4 месяца назад +2

      i think this suppose to be a joke. with the sliding glass door and everything

    • @jay.rhoden
      @jay.rhoden 4 месяца назад

      Can't decide if it's sarcasm or a joke. (Perhaps its both)

  • @_Aarius_
    @_Aarius_ 4 месяца назад +20

    I am working on a perf critical app at work, in Rust, so even my dev/debug has to use release optimisations so I can find regressions immediately. Compile times suck lmao

    • @tatoute1
      @tatoute1 4 месяца назад

      Your regressions are release specific? How come?

    • @kebbil
      @kebbil 4 месяца назад

      they're using the trust_me! macro@@tatoute1

    • @darxoonwasser
      @darxoonwasser 4 месяца назад +3

      @@tatoute1 I assume performance regressions?

  • @Jiftoo
    @Jiftoo 4 месяца назад +5

    The parallel frontend is consistently slower on (most) of my personal projects, by about one or two seconds.
    The only time it was actually faster for me is building the tokio repo (about a second of improvement in debug and half a second in release).
    I guess it only speeds things up in niche situations, like workspace builds(?)

  • @MiesvanderLippe
    @MiesvanderLippe 4 месяца назад +14

    Alternatively, think more and compile less. It is not Python :)

    • @AdamFiregate
      @AdamFiregate 4 месяца назад +1

      I do just that. I think that could even out productivity vs. compile time. 👍🌞💛

    • @TehKarmalizer
      @TehKarmalizer 4 месяца назад +4

      Observing the effects of modified code is sometimes the e best way to facilitate thinking about it.

    • @ShrirajHegde
      @ShrirajHegde 4 месяца назад +1

      Except the parsing and semantic analysis is also done constantly inside the language server.
      This means you have to complete your full thought and type the whole thing before the typing debounce kicks in.
      This statement is kind of like "if your code is bad, just make it good"

    • @ShrirajHegde
      @ShrirajHegde 4 месяца назад

      Also, python is an interpreted language. And the compilation to bytecode is practically instant. What the hell are you compiling? 😂

    • @chonkusdonkus
      @chonkusdonkus 4 месяца назад

      additionally*

  • @replicadse
    @replicadse 4 месяца назад +3

    The biggest problem with Rust is the Rust Foundation and its policies.

  • @KSmifune
    @KSmifune 4 месяца назад +3

    Tauri needs this update

  • @exciting-burp6613
    @exciting-burp6613 4 месяца назад +15

    Cranelift is going to be a bigger boost. LLVM is one of the slowest parts of the compiler. The biggest issue _by far_ is the use of ld, you can get a significant boost by configuring lld (or mold) today.

    • @adsick_ua
      @adsick_ua 4 месяца назад +1

      love Cranelift

    • @khhnator
      @khhnator 4 месяца назад +1

      i din't knew that cranelift was a thing, this certainly help things if the compile times are that bad in debug build

  • @dirac7233
    @dirac7233 4 месяца назад +1

    As long as they don't sacrifice some runtime performance for conpile-time fastening, I'm ok with the new improvement. I always set `codegen-units` to `0`.

  • @SimoLPers
    @SimoLPers 4 месяца назад +2

    Why does this feel like a dejavu?
    Is this a reupload by any chance?

  • @oefzdegoeggl
    @oefzdegoeggl 4 месяца назад +1

    Building a large program in "Borland C++ 1.0" was a pain in the ass compared to the then super-fast TurboPascal. I don't find rusts's debug compile times thaaat dramatic. For release, yes, especially with LTO turned on. But I do release build when ... well, releasing only, so not a big issue for me.

  • @DavidAlsh
    @DavidAlsh 4 месяца назад

    Dynamically loaded rlibs plz (for plugins)

  • @MikeM8891
    @MikeM8891 3 месяца назад

    I would have preferred if you tried a Bevy hello world fresh compile. That takes about 5 minutes on my computer.

  • @theelmonk
    @theelmonk 3 месяца назад

    We used to have slow compile times for *everything*. This was a real pain for C because the compiler is bad at getting out of sync and producing spurious errors. You could analyse the messages so far and then they became meaningless.
    So there was a tendency to fix the first error or two then recompile and re-evaluate. This avoided wasting time fixing errors that were really only parse failures.
    Now if you have better error messages due to more static typing and less loss of sync, it's worth considering more of the reported errors before giving up and recompiling. This increases productivity by getting more work done in the edit phase and requiring less compile cycles.
    Does Rust provide this advantage ? if you work differently, do you get similar edit/compile time ratios that you would with fast compilation ?
    Also, remember xkcd:303

  • @CitizensCommunity
    @CitizensCommunity 4 месяца назад

    The more threads and faster you run the compile, the less optimization it can do and the slower the resulting binary. It is a trade off between speed of the compile, vs speed of your code, which is more important to you?

    • @theelmonk
      @theelmonk 3 месяца назад

      Unfortunately, because of Moore's Law, in 90% of commercial environments in a tradeff between speed of compilation (and other development) and speed of execution, speed of execution loses hands down. And has done for 40 years.

  • @rmbl349
    @rmbl349 4 месяца назад

    I compile on a ryzen 7950. What's your problem?

  • @norude
    @norude 4 месяца назад +4

    Please, make a video, explaining the nightly-only feature, that will never come in to prod

  • @StefaNoneD
    @StefaNoneD 4 месяца назад

    Rust compilation is IMHO still much faster than C++ compilation without C++ modules.

  • @v0idmatr1x
    @v0idmatr1x 4 месяца назад +3

    Mold linker and sccache speed up comp times for me

  • @theLowestPointInMyLife
    @theLowestPointInMyLife 4 месяца назад +1

    I was excited to hear about this a while ago but upon trying it out, the threaded option is actually slower than single threaded.
    24 core Ryzen 5900x
    normal: 23.4s
    threads: 26.8s
    the results are very consistent, around 15% slower with threads

    • @SaHaRaSquad
      @SaHaRaSquad 4 месяца назад +1

      Did you use 8 threads like recommended in the video or all available? It may be possible that there's a sweet spot and adding more doesn't make it faster.
      Years ago I once benchmarked a program on a CPU with 4 cores & threads and for some reason it ran the fastest with 32 threads. Going higher or lower would make it run slower. Performance is weird.

    • @Luxalpa
      @Luxalpa 4 месяца назад +1

      As they wrote in the blog post, it strongly depends on the project, particularly how the dependency tree looks like

    • @theLowestPointInMyLife
      @theLowestPointInMyLife 4 месяца назад

      @@SaHaRaSquad yh, tried with 8 and 12, same results

    • @diadetediotedio6918
      @diadetediotedio6918 4 месяца назад

      @@theLowestPointInMyLife
      Maybe it is the code you are compiling tho, or even a bug in the implementation (as it is nightly).

    • @theLowestPointInMyLife
      @theLowestPointInMyLife 4 месяца назад +1

      ​@@diadetediotedio6918 yeah, its not uncommon, ive seen many people reporting the same thing, I dont really care tbh, its a non issue for me, my 23s is compiling from clean, when im changing some code with cargo watch running, it only takes about 4s, mildly annoying at worst

  • @PoopSqueezenuts
    @PoopSqueezenuts 4 месяца назад

    Awh yeah, lets get that ISO standard going and make that compiler lightning fast

  • @rusmemes
    @rusmemes 4 месяца назад +2

    I do not understand this problem at all.
    Why not having a cup of coffee (tea|bear|vodka|whatever you like) while compilation process???

    • @shinobuoshino5066
      @shinobuoshino5066 4 месяца назад

      Because I'm not a drug addict and don't want to ruin my kidneys in a day.

    • @lgasc
      @lgasc 4 месяца назад +1

      ​@@shinobuoshino5066 A fruit then?

  • @Seacrest.
    @Seacrest. 4 месяца назад +15

    installing trunk takes about 10 minutes

    • @thegoldenatlas753
      @thegoldenatlas753 4 месяца назад +9

      Took me 20s. You sure pc isn't just trash?

    • @1____-____1
      @1____-____1 4 месяца назад +12

      @@thegoldenatlas753There will always be devs that compile on a potato and complain about it.

    • @alexray4969
      @alexray4969 4 месяца назад

      ​@@1____-____1 I would rather have it be slow on my computer, than completly disregarded performance and expecting my clients computer to be just as fast as mine. It's like activating artificial network speed throttling in the web devtools, so you develop the website from the start in a way that works on slow networks as well.

  • @antelope6826
    @antelope6826 4 месяца назад +1

    I’d rather have longer compile times than a night of debugging a dumb programming mistake

  • @follantic
    @follantic 3 месяца назад

    A rust interpreter for development would be nice.

  • @ferdynandkiepski5026
    @ferdynandkiepski5026 4 месяца назад +1

    -Zthreads=8 has been available for quite some time already. Is there a timeline for when this flag will be stabilized?

  • @wiono
    @wiono 4 месяца назад +17

    compile time = coffee break. I don't see a problem.

    • @Boxing_Gamer
      @Boxing_Gamer 4 месяца назад +5

      Yes lol but you cant take a coffee break every 5 minutes

    • @diadetediotedio6918
      @diadetediotedio6918 4 месяца назад +3

      @@Boxing_Gamer
      It's not needed every 5 minutes, most of the slowest compiles comes from specific structural changes in the project, the other types of compilations are usually sufficiently fast (like 1-5s max).

    • @ggsap
      @ggsap 4 месяца назад +1

      thats not an excuse. and coffee makes me sleepy

    • @abdullahmertozdemir9437
      @abdullahmertozdemir9437 4 месяца назад

      @@ggsap what kind of metabolism do you need to get sleepy from coffee

    • @SteinGauslaaStrindhaug
      @SteinGauslaaStrindhaug 4 месяца назад +1

      ​@@abdullahmertozdemir9437 for me I think it's my ADHD, caffeine has no psychoactive effect on me, it only very slightly increases heart rate and it helps migraines. But it is a warm drink, and warm drinks make me sleepy. 😅

  • @bruceritchie7613
    @bruceritchie7613 4 месяца назад

    I just did a test on a codebase I work on. With this flag on nightly 10:24. On stable without the flag 11:09.

  • @torarinvik4920
    @torarinvik4920 4 месяца назад +3

    I have an issue with when using vectors of some enum I cannot see the values in the debugger even though they are there. It's a bit frustrating not having the ability to see the values in my code. I have to use print statements, but I cannot use those in the unit tests. I never had this issue in any other programming language. I love rust but this is really annoying.

    • @avsaase
      @avsaase 4 месяца назад

      Cargo swallows prints to stdout by default. Run your tests with `cargo test -- --nocapture` to override that.

  • @krux02
    @krux02 4 месяца назад +3

    If the only approach on tackling compile times is parallelizing and incremental compilation, then it is good night for high performance compilation. Other languages compile many orderes of magnitude faster than rust, and still don't use parallel builds or incremental compilation at all. just to name some: Vlang and Jai

    • @ITSecNEO
      @ITSecNEO 4 месяца назад +3

      JAI and Vlang are not full of useful features yet lol. Wait until their compilers get more complex and you will See the exact same Problems xD

  • @markmanning2921
    @markmanning2921 4 месяца назад +1

    My forth compiler compiles over 4 megabytes of source per scond and is SINGLE threaded. On my 12900k it would probably be much faster and unlike rust Forth is actually a readable language :)

  • @bot.
    @bot. 3 месяца назад +1

    If the compiler is too slow then just... rewrite it in rust?

    • @svenyboyyt2304
      @svenyboyyt2304 3 месяца назад

      The problem is that it uses LLVM which has a lot of work put into it, so the end result might not be as good and not as many targets would be supported. It should be done, but it's not easy.

  • @Boxing_Gamer
    @Boxing_Gamer 4 месяца назад +1

    Didn't have a problem when using the mold linker and dynamic linking.. I'm not sure there is a problem anymore really

    • @WorstDeveloper
      @WorstDeveloper 4 месяца назад +1

      Isn't mold very limited though?

    • @Boxing_Gamer
      @Boxing_Gamer 4 месяца назад

      ​@@WorstDeveloperDon't know. I've had no problems

    • @WorstDeveloper
      @WorstDeveloper 4 месяца назад

      @@Boxing_Gamer Afaik it only supports linux, right? I know that they forked Mold and named it Sold, with the intention of making a paid version for Mac and Windows. But no one wanted to pay for it so I think the development of that fork is pretty dead now.

    • @Boxing_Gamer
      @Boxing_Gamer 4 месяца назад

      @@WorstDeveloper Too bad.
      I guess the only option for windows users then is to have a Linux machine or partition while using Rust.

  • @dupdrop
    @dupdrop 4 месяца назад +2

    Doesn't most of the compiler slowness come from llvm, and generating bloated LLVM IR?

    • @buffer0xaa555
      @buffer0xaa555 4 месяца назад

      No, the Lexer is bottleneck of frontend part in the compiler.

    • @dupdrop
      @dupdrop 4 месяца назад +1

      @@buffer0xaa555 I was not talking about the compiler frontend, but the whole compiler as whole. Even non optimized lexers are super fast programs, lexing is very simple.

    • @zweitekonto9654
      @zweitekonto9654 4 месяца назад

      Wait, it still isn't self hosted?

    • @buffer0xaa555
      @buffer0xaa555 4 месяца назад

      @@dupdrop Logically simple but it take a lot instruction to the computer.

    • @diadetediotedio6918
      @diadetediotedio6918 4 месяца назад +2

      @@zweitekonto9654
      Obviously it is self hosted, but as most languages the final process of the machine code generation and optimizations is done by the old good LLVM.

  • @ruanpingshan
    @ruanpingshan 4 месяца назад +1

    2:52 Wait, did it actually use 14 GB of RAM for compilation?

    • @illusion466
      @illusion466 4 месяца назад +1

      doubtful. Windows ram always looks like that

  • @jeffg4686
    @jeffg4686 4 месяца назад

    @0:18 - good, the compiler. I thought it might have been a lawsuit when you said "taking them seriously".
    That's cool about the compile times. They weren't that bad before actually for typical projects but always welcome news.

    • @SaHaRaSquad
      @SaHaRaSquad 4 месяца назад

      Compile times vary a LOT based on the number and kind of dependencies in your project.

    • @jeffg4686
      @jeffg4686 4 месяца назад

      @@SaHaRaSquad- but only first compile, which is no biggie

    • @SaHaRaSquad
      @SaHaRaSquad 4 месяца назад

      @@jeffg4686 No, some dependencies can actually cause even recompilation to be 30 seconds or longer. I don't know how that's possible but it's happened to me in the past.

  • @darwinikii9589
    @darwinikii9589 4 месяца назад

    trt1 turkey mentioned

  • @sunofabeach9424
    @sunofabeach9424 4 месяца назад +28

    it's funny you mentioned Rayon. its error messages are insane

    • @carlosmspk
      @carlosmspk 4 месяца назад +7

      insane as in incredibly unhelpful or insane as in incredibly useful?

    • @sunofabeach9424
      @sunofabeach9424 4 месяца назад +26

      @@carlosmspk first. It correctly indentifies the problem (type mismatching) but the problem is detected at method call, not at struct creation (where it actually occures), so you spend your time trying to fix a correct piece of code because you trust Rust's compiler. In other languages, it is just a regular error message, but since it's Rust we're talking about, I expected it to be as usually precise. Luckily, people on Stack Overflow are accustomed to Rayon and know how to deal with it from experience

    • @SaHaRaSquad
      @SaHaRaSquad 4 месяца назад +3

      In my experience Rust's error messages are outstanding until the code gets too generic or macro-heavy, at which point the quality plummets noticeably. There are even situations where the compiler incorrectly throws an error in 100% valid macro code.
      That and readability in general are the reasons I usually avoid abstractions and generics and it's a very pleasant experience - but I can only do that because I write Rust in my free time.

    • @sunofabeach9424
      @sunofabeach9424 4 месяца назад +2

      @@SaHaRaSquad yeah but if you are not the only person who writes that code or even if you're alone but your code gets complex and is about to scale more, it becomes a shltshow

    • @pmmeurcatpics
      @pmmeurcatpics 4 месяца назад +6

      ​@@SaHaRaSquadoh that's definitely true. I've also noticed it with custom structs of iterator functions, like Difference, Union, Iterable etc. - you know you're screwed the moment the error messages start looking like "ATypeOfTypesOfLifetimeATypesOfdynTypes doesn't implement ATraitOfTypeIntoAType"

  • @tulsatrash
    @tulsatrash 4 месяца назад

    Armature Science.

  • @defender2212
    @defender2212 3 месяца назад

    If I don't have to wake up at 4am then I don't have any problem with compile time. ❤

  • @ScienceMinisterZero
    @ScienceMinisterZero 4 месяца назад

    evcxr could replace ipython for data science if only it weren't so laggy.

  • @luquini8246
    @luquini8246 4 месяца назад +2

    tell me if I'm wrong.
    I have a REST API made with Actix and SQLx. It builds in... 10 seconds max.
    I never saw it as an issue. I can check my email, change the music, make myself a coffee, etc.
    It's a real problem for you guys? or you are experiencing larger building times?

    • @georgehelyar
      @georgehelyar 4 месяца назад

      Yea I don't really have a problem with it, maybe because microservices are individually small.
      The main thing that makes me not care is that I don't need to compile to see compile errors though, they show up immediately in the editor as I'm typing.

  • @valcubeto
    @valcubeto 4 месяца назад

    Specially when using Tokio

  • @ITSecNEO
    @ITSecNEO 4 месяца назад

    They should just change the default linker, the most bottleneck in all of this. The frontend is already pretty fast, its the backend that scks

  • @Tumbolisu
    @Tumbolisu 4 месяца назад +1

    i just want to mention xkcd comic 303

  • @CKidder80
    @CKidder80 4 месяца назад +4

    Honestly, this is a tempest in a teakettle. I could not care less about how long it takes to compile. Make Hello World take 30 seconds if that means the compiler does a great job, checks the code thoroughly, and the resulting executable is as optimized as possible. The compile time is the least of my worries. I'd like my programs to work properly and quickly. That's the #1 goal. Compile speed is cool and all but that worry comes after most everything else. So, I think Rust got it right. It checks programs thoroughly, it tries to optimize well. After that's all said and done, sure, let's get it compiling faster too. But, calling that it's biggest problem is actually a GREAT sign. If we're down to "it takes 10 seconds too long to compile" then obviously things are in excellent shape.

  • @MoonrayMurray
    @MoonrayMurray 4 месяца назад

    Good video!

  • @andrewdunbar828
    @andrewdunbar828 4 месяца назад +9

    What does "cut by a factor of 3 mean"? It now runs in 1/3 of the time? Or 1/3 of the time was cut so it now runs in 2/3 of the time?

    • @Diragonix
      @Diragonix 4 месяца назад

      1/3

    • @ethan82714
      @ethan82714 4 месяца назад

      I think what it meant was that 1/3 of the time was removed, meaning it takes 2/3 the time.

    • @ethan82714
      @ethan82714 4 месяца назад

      @danielhalachev4714 oh ok

  • @llFike
    @llFike 4 месяца назад +3

    God, sexbots even in programming related channels? jesus

    • @thingsiplay
      @thingsiplay 4 месяца назад

      At least they don't even try to hide and makes it easy to ignore. Thank god they have these images. I don't even need to read the text. Wait until they are all upgrading to AI and actually try to look like a human being. That's when RUclips comments really die.

    • @cls880
      @cls880 4 месяца назад +1

      It knows the Rust demographic

    • @thingsiplay
      @thingsiplay 4 месяца назад

      @@cls880They are everywhere, regardless of the content.

  • @no-bias-
    @no-bias- 3 месяца назад

    1 second faster from 9 seconds. How about make it 1 second from 9 seconds instead of "1 second faster"?

  • @Randych
    @Randych 4 месяца назад

    Anyone complaining about cargo build times is welcome to run cabal build on 0 imports project.

  • @johnjakson444
    @johnjakson444 4 месяца назад

    inserting that clip of that loathsome kanye was stupid, didn't come here to see that kind of crap

  • @viniciusataidedealbuquerqu2837
    @viniciusataidedealbuquerqu2837 4 месяца назад +1

    problem with rust compile time is llvm or the backend. making the frontend faster is only 30% of the job. the other 70% is moving off of llvm at dev cycle. only use llvm when build --release is enabled

  • @ryleitdept
    @ryleitdept 4 месяца назад

    C++ numbawan!

  • @rodrigosouto9502
    @rodrigosouto9502 Месяц назад

    Nice!

  • @adriankal
    @adriankal 4 месяца назад

    The difference is too small to make any dev more productive.

    • @doods_0
      @doods_0 Месяц назад

      Maybe the benefit is when installing cargo packages for normal usage.

  • @GeorgeFosberry
    @GeorgeFosberry 4 месяца назад +1

    Rust compile times are very pleasant already when you.compare them to a medium to large C++ project.
    Full clean build can take 30 minutes or more, not your pesky seconds.

    • @kevinmcfarlane2752
      @kevinmcfarlane2752 4 месяца назад

      If we only had C++ in this space then maybe there would be less concern about slow compile. But there’s the fast Go. Yes, their application domains aren’t coincident but they do overlap considerably. So that provides an incentive to speed things up.

    • @GeorgeFosberry
      @GeorgeFosberry 4 месяца назад

      @@kevinmcfarlane2752 Well, the only thing *I* have available to me at work is C++14. And that's not going to change any time soon.
      "Muh compile times!" cries seem just inane to me. Like, really?

    • @iaphlnt
      @iaphlnt 4 месяца назад +1

      It takes seconds for a trivial project in either language, the problems arise as the codebase gets bigger

  • @idwtgymn
    @idwtgymn 3 месяца назад

    I have a hard time seeing how you end up compiling so often it becomes an actual productivity issue. Sounds like people are throwing spaghetti at the wall to try to fix bugs, I don't see how else you compile so frequently you have a problem with sub-minute delays. Maybe those long waits will give them a chance to do what they should, and fix their bugs by actually reading their code.

  • @lightprogrammer
    @lightprogrammer 4 месяца назад +4

    less compile time = less coffee time, so its a loss

    • @metatechnologist
      @metatechnologist 4 месяца назад

      I mean really I need to check messages anyway....

  • @akbulutm4
    @akbulutm4 4 месяца назад

    As bayrakları as as 🇹🇷🇹🇷🇹🇷

  • @sunhsiang6644
    @sunhsiang6644 2 месяца назад

    Coding 2 minutes,building 2 hours 😂

  • @CoDEmanX47
    @CoDEmanX47 4 месяца назад +1

    A bit disappointed that the video is about the compiler and not that it is extremely hard to properly parallelize code.

  • @martg0
    @martg0 4 месяца назад

    what happened to the rust foundation drama?

  • @yoni532s9M5w
    @yoni532s9M5w 3 месяца назад

    Rust's biggest problem is its syntax

  • @Pushons-gg2nw
    @Pushons-gg2nw 4 месяца назад

    for development and testing code we could use jit or interpreted
    and for publishing and bundling
    we could use the traditional compiling 🤔

    • @svenyboyyt2304
      @svenyboyyt2304 4 месяца назад +3

      No, that's not the issue. Creating the machine code is not the slow down, it's mainly the checks.

    • @dmitriidemenev5258
      @dmitriidemenev5258 4 месяца назад

      @@svenyboyyt2304 Also proc macros.

    • @diadetediotedio6918
      @diadetediotedio6918 4 месяца назад

      @@svenyboyyt2304
      What is the source of your claims that creating machine code is not one of the biggest slowdows? We know this is a problem even for zig, as they are creating their own compiler backend for debug mode just because LLVM is slow.

  • @vsantos1
    @vsantos1 4 месяца назад +1

    Simple cuz the language isnt made for web development? idk why ppl are trying to use cannon to kill a rat.
    - btw C++ > Rust

    • @climatechangedoesntbargain9140
      @climatechangedoesntbargain9140 4 месяца назад

      it is made for web development, ever heard of wasm or Leptos?

    • @vsantos1
      @vsantos1 4 месяца назад

      ofc, but keep your fantasy dreams on, ever heard of choosing the right tool for the job?

    • @climatechangedoesntbargain9140
      @climatechangedoesntbargain9140 4 месяца назад

      @@vsantos1 yes, that's why Rust has increasing uptake in web development

    • @vsantos1
      @vsantos1 4 месяца назад

  • @user-le8gc3th8x
    @user-le8gc3th8x 4 месяца назад +4

    Its not biggest problem of rust. His biggest problem is impossibility to make more than one mut borrow. As result writing any tree-like structure to complex. So even c++ better than rust for gamedev. And its reason why crutch like RefCell exist.

    • @patrickmiharisoa5501
      @patrickmiharisoa5501 4 месяца назад +15

      More than one mutable borrow can potentially lead to data race

    • @svenyboyyt2304
      @svenyboyyt2304 4 месяца назад +10

      No, that's by design. Using things like RefCell isn't bad.

    • @diadetediotedio6918
      @diadetediotedio6918 4 месяца назад +9

      Lol, this is like almost the whole reason of why Rust is considered memory safe, you cannot make crazy things like borrowing an item from an array and then trying to clear the array while it is in use (or overwrite the item or anything).
      And for game dev, you have bevy which abstracts on top of the Rust limitations and gives you a safe interface for handling game logic, you would not need to worry about that in games because usually you would build things in a more unsafe manner and just expose the safe abstractions.

    • @hayden.A0
      @hayden.A0 4 месяца назад +4

      Rust preventing you from using multiple mut borrows is essentially forcing you to do things the right way. Things like multiple mutable borrows are a big cause of memory errors and security holes in programs using C or C++. Rust is thus "harder" to program with but gives much better guarantees about memory safety. It's the whole point of Rust.

    • @tablettablete186
      @tablettablete186 4 месяца назад

      Isn't it Arc used for this exact scenario?

  • @InMemoryOfNeo
    @InMemoryOfNeo 4 месяца назад

    trt1 mi? hahahaaaa :D as bayrakları as as as :D 🇹🇷🇹🇷🇹🇷🇹🇷🇹🇷🇹🇷🇹🇷

  • @zohnannor
    @zohnannor 4 месяца назад

    stop spreading misinformation, have you seen big cpp project compile times?