Jonathan Blow on Swift's Compile Times

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ม.ค. 2025

ความคิดเห็น •

  • @chepulis
    @chepulis 9 หลายเดือนก่อน +117

    "Someone, help me, the [lang]] compile time is too fast" is a Stack Overflow post no one would make

    • @ProjectXiel
      @ProjectXiel 9 หลายเดือนก่อน

      Try typing "Go compile times" into google, not saying its good or bad, and see what result you get

    • @ProjectXiel
      @ProjectXiel 9 หลายเดือนก่อน

      Try typing "Go compile times" into google, and see what you get

    • @SaHaRaSquad
      @SaHaRaSquad 9 หลายเดือนก่อน +81

      Literally the first result when you repeat this with Golang is a Stack Overflow post named "How does Go compile so quickly?"

    • @sergeysmyshlyaev9716
      @sergeysmyshlyaev9716 9 หลายเดือนก่อน +1

      ​@@SaHaRaSquad nice partisan marketing by Google.

    • @SaHaRaSquad
      @SaHaRaSquad 9 หลายเดือนก่อน +5

      @@sergeysmyshlyaev9716 Why are people here getting more bananas every day lol. I dislike Go as a language and Google, but hating them is not my ideology because I'm not a fucking lunatic.

  • @HairyPixels
    @HairyPixels 9 หลายเดือนก่อน +47

    Swift is one thing, Xcode is another. It's so damn slow and broken all the time. I'm sure Swift is slow by itself but using Xcode alongside it is a whole new level of suffering.

    • @XeZrunner
      @XeZrunner 9 หลายเดือนก่อน +14

      Xcode feels like every function is async, with intentional 1s sleeps in there for fun

    • @zl5667
      @zl5667 9 หลายเดือนก่อน

      @@XeZrunnerlol😂

  • @sporefergieboy10
    @sporefergieboy10 9 หลายเดือนก่อน +18

    I remember in swift 1.0 days certain type inferences took exponential time. Your compiler would just run in an infinite loop trying to figure them out I don’t even think they timed out

  • @steveoc64
    @steveoc64 9 หลายเดือนก่อน +11

    Compile time is hugely underrated when looking at compilers
    Go has gained enormous traction thanks to excellent compile speed

  • @southgonholditdown
    @southgonholditdown 9 หลายเดือนก่อน +46

    Jonathan Blow is so smart and so attractive

    • @loli42
      @loli42 9 หลายเดือนก่อน +8

      this but unironically

    • @UrienOld
      @UrienOld 7 หลายเดือนก่อน

      U gay asf for that ngl

    • @SneedsFeeduckAndSeeduck
      @SneedsFeeduckAndSeeduck 6 หลายเดือนก่อน

      @@loli42 that user name kek

    • @sef-kc9vk
      @sef-kc9vk 6 หลายเดือนก่อน +1

      one is false

  • @ArthurSchoppenweghauer
    @ArthurSchoppenweghauer 9 หลายเดือนก่อน +11

    Swift devs on suicide watch

  • @RandomlyAwesomeGamer
    @RandomlyAwesomeGamer 9 หลายเดือนก่อน +1

    Funny that one of the search results names him and jai.

  • @iamjhou
    @iamjhou 9 หลายเดือนก่อน +2

    haha Nice one!! Are you going to do the same for Rust compile time?

  • @AllanSavolainen
    @AllanSavolainen 9 หลายเดือนก่อน +6

    After Go, all compilers feel like molasses, except Borland Turbo Pascal 7, which is superior in all ways.

    • @pokefreak2112
      @pokefreak2112 9 หลายเดือนก่อน +2

      tcc is also incredibly fast. It can compile my hobby lang (7k loc) compiler, compile a program using the freshly built compiler and then run that program all in 3ms.
      And I'm pretty sure most of that time is just disk io lol

    • @AllanSavolainen
      @AllanSavolainen 9 หลายเดือนก่อน

      @@pokefreak2112 I am sure the IDE is still worse than Borland's :D

    • @ErazerPT
      @ErazerPT 8 หลายเดือนก่อน

      @@AllanSavolainen TCC > Turbo C Compiler by... Borland. It's pretty much the same IDE as TP. BCC > Borland C Compiler is the sucessor to TCC. Could use the command line part for free but not the IDE.

    • @AllanSavolainen
      @AllanSavolainen 8 หลายเดือนก่อน

      @@ErazerPT but it is inferior as compiling pascal was single pass process thus faster ;)

    • @ErazerPT
      @ErazerPT 8 หลายเดือนก่อน

      @@AllanSavolainen Had to re-check, memory is fuzzy so far back, but found the manual and it says "One pass compiler". And not just TCC, many (non optimizing) compilers are single pass, especially in forward declaration languages like Pascal/C/C++/etc It's when you turn on the "optimizing" part that things go South.
      Fun fact, many compiled BASIC's leveraged this to be "fast" by not optimizing the BASIC bits and having as much as possible "library functions" that were already optimized and simply needed to be linked. Kind of cheating but... if it works...

  • @sayChristIsKing
    @sayChristIsKing 9 หลายเดือนก่อน +17

    "Reads first page of google"
    "Gets views"
    How does he do it?

    • @Q_20
      @Q_20 9 หลายเดือนก่อน +9

      big rizzler gamedev

    • @maksymiliank5135
      @maksymiliank5135 9 หลายเดือนก่อน +1

      Become a well known individual in the industry after 20+ years of experience, start live streaming and saying the most controversial stuff you can think of. Nothing triggers people more than a comment they don't agree with or think that it's wrong

    • @MrLordFireDragon
      @MrLordFireDragon 9 หลายเดือนก่อน +5

      To be clear, he doesn't do anything. Clip channels are the ones doing stuff. It's not like he's saying this stuff so it can get clipped and make him millions.

  • @olbluelips
    @olbluelips 5 หลายเดือนก่อน

    I’m here for the jblo-comments section debate

  • @TeamPuzel
    @TeamPuzel 9 หลายเดือนก่อน

    So is Rust and Haskell, such type systems come at a cost.

  • @robchr
    @robchr 9 หลายเดือนก่อน +8

    This works for any language.

    • @SaHaRaSquad
      @SaHaRaSquad 9 หลายเดือนก่อน +5

      Try it with Go then.

    • @blueskyautumn
      @blueskyautumn 9 หลายเดือนก่อน

      Yeah search Go and see that its the complete opposite

    • @doekewartena5729
      @doekewartena5729 9 หลายเดือนก่อน +4

      @@SaHaRaSquadYeah I was putting it to the test with different languages. It certainly doesn't work with every language.

    • @TenseiCho
      @TenseiCho 9 หลายเดือนก่อน

      @@doekewartena5729 What are some notable ones?

  • @simply6162
    @simply6162 2 หลายเดือนก่อน

    bro needs to use Apple Silicon Mac lmao

  • @a097f7g
    @a097f7g 9 หลายเดือนก่อน +7

    Swifts compile times truly are garbage, I tried it out and noped right out of there. Jai all the way.

    • @cableshaft
      @cableshaft 9 หลายเดือนก่อน +3

      Swift does have the advantage over Jai in that it's publicly available, though.

    • @sumofat4994
      @sumofat4994 9 หลายเดือนก่อน +3

      @@cableshaft Thats not an advantage.

    • @captainfordo1
      @captainfordo1 9 หลายเดือนก่อน +3

      @@cableshaftwhat is it with software devs and being obsessed with open source open alpha open everything? Jai will become public once it’s ready.

    • @cableshaft
      @cableshaft 9 หลายเดือนก่อน +1

      @@captainfordo1Didn't say it needed to be open sourced, or even that it needs to be released right this second.
      But I can at least work with Swift right now, and can't do anything with Jai. It's like saying "Here's this amazing piece of chocolate that's so much better than the crap you're used to, but you can't have it. But let's all talk about how amazing this piece of chocolate is for years and years in the meantime instead of actually being able to enjoy what's available to you in the moment."
      I'll happily try Jai once it's released, but in the meantime I have to use something to develop software with, so I have no choice but to use the 'inferior' options.

    • @cableshaft
      @cableshaft 9 หลายเดือนก่อน

      @@sumofat4994It's an advantage to me, as one of the vast majority who are not part of the Jai inner circle. I'll give Jai a chance once it's released, but in the meantime I will focus on and use what is available for me to use.

  • @jalalle1995
    @jalalle1995 9 หลายเดือนก่อน

    as if people who write about compile time in swift are doing that to praise it's speed (oh it compiled 1m lines in 1s let me write an article real quick) of course it's going to be about people complaining about speed no matter how neutral your search is

    • @seriouscat2231
      @seriouscat2231 8 หลายเดือนก่อน

      Spelled its speed, without the apostrophe.

  • @nidavelliir
    @nidavelliir 9 หลายเดือนก่อน +41

    This is the definition of confirmation bias

    • @michaelzomsuv3631
      @michaelzomsuv3631 9 หลายเดือนก่อน +25

      Except it actually matches reality. Swift's compile times are horrendously bad.

    • @mohamaddelkhah
      @mohamaddelkhah 9 หลายเดือนก่อน +1

      @@michaelzomsuv3631 I might divine the stars and consult ancestral spirits to reach the correct conclusion by chance. Doesn't make my methods right.
      Although to be fair, he wasn't saying this in an academic article either, so there's no need to hold him to an absolutely neutral unbiased standard. But those of us who mention it aren't wrong either.

    • @remsee1608
      @remsee1608 9 หลายเดือนก่อน +13

      Except he used a neutral search phrase

    • @alfiegordon9013
      @alfiegordon9013 9 หลายเดือนก่อน

      ​@@remsee1608yes, but nobody is gonna go onto the stackoverflow or medium and complain that swift is too fast
      If you search for the keywords swift and compile you're obviously gonna get ppl bitching that it's too slow even if it's not in 99% of cases

    • @SaHaRaSquad
      @SaHaRaSquad 9 หลายเดือนก่อน +7

      It is not. If you do the same search with languages like Go you will get the exact opposite result, with posts praising its compilation speed.

  • @evlogiy
    @evlogiy 9 หลายเดือนก่อน +6

    Why everyone is so concerned about compile time? It's like those people who compare linux distributions by memory usage.

    • @sumofat4994
      @sumofat4994 9 หลายเดือนก่อน +8

      I guess you like more compile time? WTF.
      Compile times are one of the big killers of productivity in a project. Not to mention iteration speed.

    • @leadensage
      @leadensage 9 หลายเดือนก่อน +11

      Work on a big project written in C++ and come back to answer your own question.

    • @remcogreve7982
      @remcogreve7982 9 หลายเดือนก่อน

      @@sumofat4994compile time only matters for noobs who put everything in their header files

    • @1UPMidget
      @1UPMidget 9 หลายเดือนก่อน +2

      It matters because some people don't get paid by the hour

  • @jonahbranch5625
    @jonahbranch5625 9 หลายเดือนก่อน +1

    Biased.... people generally don't log onto social media to brag about compile times, but they do to complain about them. So naturally there would be more posts about speeding up compile times.
    Can't wait for Jai to release so I can perform the same "experiment" haha. Even if jai is super fast at compilation, there will be enough people still trying to optimize their build time to fill the first page of search results with similar posts.

  • @miikavihersaari3104
    @miikavihersaari3104 9 หลายเดือนก่อน +4

    Slow is the new fast

    • @olbluelips
      @olbluelips 5 หลายเดือนก่อน +1

      If you liked “worse is better”, you’ll LOVE “slow is faster”

  • @remcogreve7982
    @remcogreve7982 9 หลายเดือนก่อน +1

    If compile time was really that important everybody would be programming in turbo pascal. C had pretty bad compile times back in the day.

  • @KamaKase
    @KamaKase 9 หลายเดือนก่อน +16

    As much as I generally agree with JB. This is a bad metric.
    Type in "headache" and everything is about curing a headache. Compile time is inherently a pain point, so of course most results will be for solutions.

    • @fmzbl
      @fmzbl 9 หลายเดือนก่อน

      i mean, if you search for "Go compile times" you get people wondering how they are so fast.

    • @Salantor
      @Salantor 9 หลายเดือนก่อน +19

      Depends. "C++ compile time" returned 0 results related to speed. "Golang compile time" returned results asking why Go comp time is so fast. For swift there was at least a few "why is it so slow?" question.

    • @torginus
      @torginus 9 หลายเดือนก่อน +5

      I don't think people tend to complain about Java or Go compile times that much.

    • @aaronwinter7911
      @aaronwinter7911 9 หลายเดือนก่อน +7

      th-cam.com/video/Q-KSe63LDgI/w-d-xo.html
      i picked out a random video of someone building a swift project
      it takes 10 seconds for a fresh build. given he uses the default build shortcut I suspect that means debug build. as a little bonus, he even says in the end that maybe for such a small app 10 seconds seems a little slow.
      I checked the repo, this is 1350 lines of swift code. This is really small. 10 seconds is abysmal for that project size, even if it was a release build.

    • @twenty-fifth420
      @twenty-fifth420 9 หลายเดือนก่อน

      ⁠@@SalantorI think this statistically though just an issue of how people think of compile times.
      Think about it, if C/C++ are fast as a base for LLVM, why is Rust and Swift ‘slow’?
      An easy answer is just how big of a compile both Rust and Swift are since they depend on that huge LLVM stack. But I agree with OP, this is a bad metric. Some people will always point out the negative of their experience and use that to make a bad bayesian guess.
      I will also say programming doesn’t have to be always about compile times. I mean, maybe if you are writing a huge project and trying to build it, sure then maybe I will change my view point to the opposite. But after all, I do not know many languages if any that can compare to C++ for just compiling/building. Also, how would a true, statistical metric for a compile time work?
      Say I wrote a 1000 line of code project in an assortment of languages and I compile them, is it really fair to just map them to their compile times for my machine? Or should I use a cloud machine? Questions like these are the reasons why I think it is just not a good idea to search up compile times.
      Now, all that said, Swift is kind of middle of the road for my compiles. Not the fastest certainly, but also not the slowest. I think the fastest is either C++ with GCC/Clang or Nim. Or V, but that language is still kind of new and not feature complete.

  • @potato9832
    @potato9832 9 หลายเดือนก่อน

    Not sure about this vid. Feels like you're phoning it in.

    • @olbluelips
      @olbluelips 5 หลายเดือนก่อน

      An55 second slip? Now way

  • @MrMastrsushi
    @MrMastrsushi 9 หลายเดือนก่อน +4

    As vaporware Jai is still in beta

    • @KuroOnehalf
      @KuroOnehalf 9 หลายเดือนก่อน +9

      Why do people keep saying this as if it's some gotcha? There's tons of videos of people using jai out there. It's not public yet, but that doesn't mean it isn't real and doesn't do what it purports to.

    • @MrMastrsushi
      @MrMastrsushi 9 หลายเดือนก่อน +3

      @@KuroOnehalf Because a software product being production ready is a lot more realistic of an expectation.
      Swift may be slow but it handles a lot more than Jai does

  • @lapieuvreee
    @lapieuvreee 9 หลายเดือนก่อน

    Swift and swift compiler are not the same thing tho!

  • @mohamaddelkhah
    @mohamaddelkhah 9 หลายเดือนก่อน +12

    That's not quite neutral though. The very nature of "compile time" is that you don't want to have any.

    • @gnarusg8708
      @gnarusg8708 9 หลายเดือนก่อน +9

      What? That's perfectly neutral. Do the same for go compile times and you'll get mostly positive sentiments. And in what world would that be the "nature" of... Oh wait... You're trolling. Damn I fell for it.

    • @mohamaddelkhah
      @mohamaddelkhah 9 หลายเดือนก่อน +1

      @@gnarusg8708 go might have exceptionally fast compile times, but that doesn't make the query neutral. Sure, you might say then swift doesn't have exceptionally good compile times. But you can't deduce anything beyond that. You can't find out whether it's faster than most of other languages or not.
      Also yes, it's part of the nature of compile time that you always want to decrease it as much as possible. If other factors remain the same, no one ever would pick "more compile time" over "less compile time".
      I'm not a swift fan. Actually I'd be happy each time it takes a blow, specially by Blow. And I do think it's compile times are bad.
      But searching a problem in google (which "compile time" inherently is) and finding problem isn't the way to show it.

    • @michaelzomsuv3631
      @michaelzomsuv3631 9 หลายเดือนก่อน +1

      No, not really. Compile time exists, the very nature of compile time is to exist. To wish for compile times to not exist is living in fantasy land.

    • @soufiane4527
      @soufiane4527 9 หลายเดือนก่อน +2

      @@michaelzomsuv3631 You missed the point

    • @mohamaddelkhah
      @mohamaddelkhah 9 หลายเดือนก่อน +1

      @@michaelzomsuv3631Well if you wish to be so hard on the use of language to say that what I said isn't applicable to its nature, then it definitely wouldn't be "to exist" either. Existence of compile time is a side effect of compilation process. And the nature of compilation process wouldn't be "to exist" either.
      However if you read my comment in good faith and engage with what I'm meaning by it, you'd realize I'm just saying "compile time is inherently undesirable, and if we isolate it from other factors, you'd always wish to decrease it as much as possible".

  • @yodayoutalklike488
    @yodayoutalklike488 9 หลายเดือนก่อน +2

    bruh swifts compiler on the m1 chip is light years faster than the jai compiler running on whatever dinosaur intel x86 processor he's using.

    • @imranzero
      @imranzero 9 หลายเดือนก่อน +4

      suuuure

  • @Jiftoo
    @Jiftoo 9 หลายเดือนก่อน +2

    im starting to think this guy just likes to complain

    • @Yxcell
      @Yxcell 9 หลายเดือนก่อน +4

      Is there anyone who dislikes complaining though?

  • @kanecassidy9126
    @kanecassidy9126 9 หลายเดือนก่อน +2

    who cares for compile time? runtime is everything