Python laid waste to my C++!

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ธ.ค. 2024

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

  • @fleefie
    @fleefie 5 ชั่วโมงที่ผ่านมา +115

    - Shitting on Python
    - Shitting on C++
    - Shitting on OOP
    - Baiting Rusties
    - Implying that C allows some unsafe design patterns
    - Not even considering traditionally functional languages because of performance reasons
    It's... beautiful. Every single programmer has been offended equally. Impressive.
    The only way to have it done even further would be baiting C fans and saying "Anyways, I'll use Java and let the JVM handle the memory optimizations".

    • @henrycgs
      @henrycgs 5 ชั่วโมงที่ผ่านมา

      it's.. it's not rusties!!! it's rustaceans!! 🤬🤬

    • @ravenking5558
      @ravenking5558 4 ชั่วโมงที่ผ่านมา +2

      This right here earned my subscription.

    • @iCrimzon
      @iCrimzon 3 ชั่วโมงที่ผ่านมา +7

      This doesnt affect me because i use scratch

    • @yaksher
      @yaksher ชั่วโมงที่ผ่านมา +4

      As someone who would generally say my favorite language is C, "C allows some unsafe design patterns" has gotta be one of those "understatement of the year" moments.

  • @fburton8
    @fburton8 7 ชั่วโมงที่ผ่านมา +125

    "If you didn't get why this is funny, you might need an interpreter" 🤣

  • @zyansheep
    @zyansheep 8 ชั่วโมงที่ผ่านมา +149

    When Sheafification becomes Low Level Learningification:

    • @n00bxl71
      @n00bxl71 6 ชั่วโมงที่ผ่านมา +8

      Apparently Low Level TVification now

  • @dono42
    @dono42 6 ชั่วโมงที่ผ่านมา +69

    In the late 90s when I took an intro C programming course the teacher asked us to write a program to calculate Fibonacci numbers. Recursion would overflow the stack as the input grew so instead I used the closed-form Binet formula to avoid this. It also had constant time. Apparently the teacher was expecting a recursion solution as I failed the assignment.

    • @superomego4138
      @superomego4138 6 ชั่วโมงที่ผ่านมา +9

      Tough luck. You couldn't even argue against it?

    • @mage3690
      @mage3690 5 ชั่วโมงที่ผ่านมา +20

      W H A T that's crazy your prof just decided that independent research should be penalized like that. Especially being that this was back in the 90s, before Google.

    • @Noname-67
      @Noname-67 ชั่วโมงที่ผ่านมา +6

      Unless the question specifically states you have to use recursion, that's just ridiculous.

  • @DeuxisWasTaken
    @DeuxisWasTaken 7 ชั่วโมงที่ผ่านมา +43

    5:14 This is an excellent lesson that all programmers should know. C++ is more efficient, if you use it correctly. And it's harder to use correctly than something like Python, where smarter people wrote the low-level routines and your job is only to use them as intended.
    B-but C++ also has high-level routines written by smarter people! Yes, and even they are harder to use.
    Of course, the optimal play would be to use something like Julia, that presents a simple high-level language like Python and compiles to highly efficient code like well used C++. The language war often misses the point trying to fight over 20 year old languages when we've made such gigantic compiler progress over that time.

    • @ZeroPlayerGame
      @ZeroPlayerGame 2 ชั่วโมงที่ผ่านมา +3

      Juliaalsohasthings to watch out for! Learning it recently, and code outside of functions can be like 20x slower, even if you're just calling a function in a loop. The magical compile on the fly thing is super cool, but full of surprises.

    • @Atomtomate
      @Atomtomate 57 นาทีที่ผ่านมา

      @@ZeroPlayerGame you can use @code_native to see the assembly generated for a function call. But you are right, Julia runtimes are much more obscure to predict than C.

  • @trwn87
    @trwn87 ชั่วโมงที่ผ่านมา +1

    1:54 Your memes keep getting better and better!

  • @panjak323
    @panjak323 3 ชั่วโมงที่ผ่านมา +22

    So python has nothing to do with it.
    Should've just named the video: "I suck at C++".

    • @stefanalecu9532
      @stefanalecu9532 3 ชั่วโมงที่ผ่านมา

      it's honestly amazing how he can pull up complex classes making a dumb point about control flow, but he can't use std::move or even just move auto tmp inside the loop to actually have a move instead of a copy.

    • @ZeroPlayerGame
      @ZeroPlayerGame ชั่วโมงที่ผ่านมา +6

      Your momma raise you to be rude to strangers like that?

    • @thefakepie1126
      @thefakepie1126 27 นาทีที่ผ่านมา

      ​@@ZeroPlayerGameWe agree, this dude is way too comfortable disrespecting others and not getting punched in the face for it

  • @noobyfromhell
    @noobyfromhell 5 ชั่วโมงที่ผ่านมา +22

    9:06 tmp doesn't actually go out of scope because you declared it outside the loop. Even if it did, unfortunately the C++ standard has very strict rules for copy elision. Each value in C++ has not only type, but also a category. Unfortunately, value categories are not that of category theory, but there are 2 of them: l-values (something you can assign to) and r-values, which we can further divide into pr-values (roughly speaking, results of expressions unless they explicitly return l-values), and x-values (something that would be an l-value but it was derived from something explicitly marked as an x-value). On top of it, there are also NRVO rules that allow a return statement to sometimes convert its argument to a pr-value if it's just a local variable with no shenanigans (not x-value IIRC, because reasons). Also note that an r-value reference may itself be an l-value, it merely encodes that the thing it's referencing was an r-value when the reference was being created. tmp is an l-value in your code because it's always assignable. to fix it: (1) declare tmp inside the loop: auto tmp = a + b, and (2) convert it to an x-value explicitly: b = std::move(tmp). Note that you don't have to do anything with the return statement, because this is actually the only place in your code where the compiler's got your back :)

  • @DavidNadlinger
    @DavidNadlinger 7 ชั่วโมงที่ผ่านมา +17

    x86 assembly, category theroy jokes, and memes? What an unexpected, delightful combination! It would be interesting to have GMP's mpz_fib_ui() in the plot as a baseline comparison.

  • @trwn87
    @trwn87 ชั่วโมงที่ผ่านมา +1

    1:29 The meme on the right is SOOO accurate!

  • @wumi2419
    @wumi2419 7 ชั่วโมงที่ผ่านมา +28

    I got reminded about haskell again. It's such a beautiful language if you can read it. I can't.

    • @PRiKoL1ST1
      @PRiKoL1ST1 ชั่วโมงที่ผ่านมา

      If you use arch, you can learn Haskell

    • @wumi2419
      @wumi2419 ชั่วโมงที่ผ่านมา

      @PRiKoL1ST1 I don't really have a reason to. I haven't been using xmonad for about 3 years, I don't know if waymonad is even a thing, and my life is difficult enough due to nix.
      EDIT: also I don't really know of other things I can use/want to write that use Haskell.

  • @trwn87
    @trwn87 57 นาทีที่ผ่านมา +1

    4:03 A legendary image of Lorem Ipsum.

  • @trwn87
    @trwn87 59 นาทีที่ผ่านมา +2

    2:52 Man, Mr. G, the word play… It’s brilliant! (Insert chess “!!”)

  • @bigbigx2250
    @bigbigx2250 7 ชั่วโมงที่ผ่านมา +8

    14:40 in fact, doing something like this can often make your code slower as the compiler may be unable to recognise what you want to do and optimise accordingly

  • @artemis4610
    @artemis4610 7 ชั่วโมงที่ผ่านมา +12

    His next video will be a cooking tutorial on currying in C.

  • @Eyad_Jawad
    @Eyad_Jawad 6 ชั่วโมงที่ผ่านมา +4

    Aside from jokes, I really searched a lot for a video like yours, but I couldn't find any so I sat waiting for another one and here it is!

  • @trwn87
    @trwn87 ชั่วโมงที่ผ่านมา +1

    0:13 The bottom left is a great start for your video, as always!

  • @playerguy2
    @playerguy2 ชั่วโมงที่ผ่านมา +2

    "With great speed comes great cppaghetti" is probably _the_ best pun I've heard so far.
    Not very surprising it shows up here given the ~~video's~~ channel's propensity for being as joke-filled as it is informative.

  • @kiryonnakira7566
    @kiryonnakira7566 6 ชั่วโมงที่ผ่านมา +5

    2:50 "if you didn't get why this is funny, you might need an interpreter"
    gold

  • @trwn87
    @trwn87 56 นาทีที่ผ่านมา +1

    4:12 G, where did get THAT image from!? 🤣🤣🤣🤣🤣

  • @IronhandedLayman
    @IronhandedLayman 2 ชั่วโมงที่ผ่านมา +1

    Why move anything? Hold 3 big enough numbers. put 0 in n_1, 1 in n_2, n_3=n_2+n_1 destructively, n_1=n_3+n_2 destructively, n_2=n_1+n_3 destructively, repeat the last three additions in groups of three for as long as you like. At the end of the loop, just take n_2.

  • @Celastrous
    @Celastrous ชั่วโมงที่ผ่านมา +1

    "music by John Cage" lmao

  • @trwn87
    @trwn87 53 นาทีที่ผ่านมา +1

    5:36 This is literally me every time I make a program!

  • @noobyfromhell
    @noobyfromhell 7 ชั่วโมงที่ผ่านมา +13

    2:07 Haha classic, you forgot to turn off stdio sync and untie cout from cin, freaking *everybody* makes this mistake at least once in their life. I'm officially granting you the title of honorary programmer.

    • @ivanjermakov
      @ivanjermakov 5 ชั่วโมงที่ผ่านมา

      Comparing languages' performance by syscalls in a for loop is quite funny. Although the conclusion is correct.

    • @D0Samp
      @D0Samp 5 ชั่วโมงที่ผ่านมา +2

      The invocation of std::endl is the biggest sin here. The synchronized C++ stream, while not using a buffer of its own, still uses the buffer of its synchronized C stream, and you don't pay for flushing standard output if you never read from standard input.

  • @null_s3t
    @null_s3t 8 ชั่วโมงที่ผ่านมา +24

    but steel is heavier than feathers 😟😟

    • @skilz8098
      @skilz8098 6 ชั่วโมงที่ผ่านมา

      That all depends on how much steel you have compared to how many feathers you have.

    • @nimitzpro
      @nimitzpro 6 ชั่วโมงที่ผ่านมา

      *insert monogatari ost*

    • @cybermaz4819
      @cybermaz4819 5 ชั่วโมงที่ผ่านมา

      "But they're both a kilogram"

  • @gonzothealmighty7231
    @gonzothealmighty7231 7 ชั่วโมงที่ผ่านมา +6

    Hi G, TH-cam has auto translated the title and description into german, could you please disable the option for autotranslation? Thanks.

  • @pmmeurcatpics
    @pmmeurcatpics ชั่วโมงที่ผ่านมา

    Watching a video on this channel that I can _actually_ understand feels really refreshing - and I gotta say, this definitely makes it one of my favorites!

  • @trwn87
    @trwn87 54 นาทีที่ผ่านมา +1

    5:29 What am I looking at?

  • @noobyfromhell
    @noobyfromhell 5 ชั่วโมงที่ผ่านมา +1

    9:56 just make sure you never reserve space in a vector that you haven't created in the same function, because that's one easy way of getting an accidentally quadratic algorithm if you then call this function on the same vector in a loop. Unfortunately, C++ doesn't protect you from this footgun. You can however write your own version of reserve that rounds the capacity up to a power of two, then only performs the reserve if the current capacity is smaller.

  • @johanavril1691
    @johanavril1691 7 ชั่วโมงที่ผ่านมา +5

    The github repo in the description is private :(

    • @SheafificationOfG
      @SheafificationOfG  7 ชั่วโมงที่ผ่านมา +9

      Whoops
      Fixed the repo link, should be gucci now

  • @NavajoMX
    @NavajoMX 5 ชั่วโมงที่ผ่านมา +6

    Can you leave the memes onscreen for a second longer? I’m watching on my TV which takes a sec to pause and only scrubs in 5 second chunks, so it’s a bit hard to rewind and time the pause perfectly each time to see the memes. Totally a me problem, but just sayin’.

    • @mage3690
      @mage3690 5 ชั่วโมงที่ผ่านมา +2

      Real. I read pretty quick, so I could catch most of them in real time, but a bit more time would make them easier to digest and make the jokes and implications hit harder.

  • @MataNui1231
    @MataNui1231 4 ชั่วโมงที่ผ่านมา +1

    When you fill up your tank with diesel instead of gas and wonder why it doesn't start

  • @mage3690
    @mage3690 6 ชั่วโมงที่ผ่านมา +2

    The ONE time C is better (well, there are a couple other cases, but they're admittedly just as rare and obtuse as this). Now in C23, you can write big ints as `_BitInt(128) a = `. No special classes, no operator overloading code, no inline assembly when you want to use the ADC instruction to flex, no attempting to SIMD your operator overloading code when you _really_ want to dunk on Python -- the compiler will do all that for you. Just raw, concentrated crack -- er, I mean, speed, don't tell Mom.
    Note that the C23 standard only _requires_ a minimum of 128 bits to be implemented -- larger widths are optional.

    • @proloycodes
      @proloycodes 5 ชั่วโมงที่ผ่านมา

      1^127=1

    • @mage3690
      @mage3690 4 ชั่วโมงที่ผ่านมา

      @proloycodes shit. Meant to write

    • @stefanalecu9532
      @stefanalecu9532 2 ชั่วโมงที่ผ่านมา

      you didn't say I can't use compiler extensions or keep track of 2 uint64_t's (not like it would be hard to do for this purpose). __int128 has been a thing for quite a while.
      you're stealing constexpr and auto and nullptr and actual true/false and empty initializers (because doing ={} is some big brain thing) from us in C23, we're stealing stdbit.h and stdckdint.h and #embed from you, we're even

  • @anthonythemortal6444
    @anthonythemortal6444 7 ชั่วโมงที่ผ่านมา

    I loved the video, as always with your content, but now your honest take on optimization is very useful :D

  • @SuperRedstoneman
    @SuperRedstoneman 7 ชั่วโมงที่ผ่านมา +1

    I wish I could understand better the subjects of your other videos to feel the same rollercoaster of emotions that your mind created.

  • @georgH
    @georgH 4 ชั่วโมงที่ผ่านมา

    OMG That was so funny!! Yes, I would like to see the continuation of this video...

  • @sinom
    @sinom 6 ชั่วโมงที่ผ่านมา +1

    12:30 Actually thought I'd know where all possible direct function calls there are, but a bit confused about some of the ones listed.
    What I would have thought would happen was:
    default constructor x
    default constructor y
    (maybe comma call x,y but unsure if they would be called there. Probably not)
    enum cast/constructor SEPARATED
    enum cast/constructor SHEAF
    operator=(x)
    operator=(y)
    operator,(x,y) (but ffs no one should ever do this)
    ~x
    ~y
    What I only realized after I saw your code was that the comma operator could be for an entirely different type whose constructors themselves could take by copy instead of by which would be 4 additional constructors and destructory, so then we have
    default constructor x
    default constructor y
    enum cast/constructor SEPARATED
    enum cast/constructor SHEAF
    operator=(x)
    operator=(y)
    copy constructor x_copy
    copy constructor y_copy
    constructor comma_y
    constructor comma_x
    operator,(comma_x,comma_y) (STILL no one should do this)
    ~comma_x
    ~x_copy
    ~comma_y
    ~y_copy
    ~x
    ~y
    But that's still missing 6 more
    I guess you're then in the constructor for sheafy_comma calling the copy constructor another 2 times and then destucting those 2 copies as well, but I personally wouldn't say any of those 4 were called directly by the main function (neither would I say the 4 calls from a function taking its arguments as copy would but let's for the sake of argument call all of those) but even if you count those there's 2 more missing so I'm somewhat confused where the last few come from
    Edit: oh only just noticed that you implemented the operator, as taking the operands by value instead of by reference so I guess that should add another 4 calls, and with the 2 you said don't count I guess that's 23 now
    (though I still wouldn't really count function calls done because of pass by copy as being done by the one calling the function, but instead by the function itself)
    Still in general it's fair to say that in C++ you need to be aware that most things can be overloaded and if anyone in your chain of function calls has some bad overloads that can quickly cause issues

  • @hullukana214
    @hullukana214 6 ชั่วโมงที่ผ่านมา +3

    I for fun decided to try out the code that printed billion numbers on my machine as well, tho with only million numbers due to being inpatient. Python took about 4,5 seconds and c++ both with std::endl and
    and also c with printf all took about 2,5 seconds. And I didn't use any compiler optimizations. Not sure why such a big difference compared to what you got. Maybe its due to printing less numbers, but I doubt it since million prints is already quite few. And I also run each one several times, no noticeable differences between different runs with any of them.
    Edit: I tried using compiler optimizations. With them instead of c, and both c++ versions taking 2,5 second plus or minus 0,1 seconds, now they all take about 2,2-2,5 seconds. Still no noticeable differences between them.

    • @D0Samp
      @D0Samp 4 ชั่วโมงที่ผ่านมา

      There must be something wrong with your measurement (or you're maybe running the same program multiple times by mistake). The trivial count to a million loop in C++ takes about 1.0 second for me (wherein almost half of the time is spent in the Linux kernel according to user/sys timing, because it's invoking the write syscall a million times) with std::endl, yet only about 0.06 seconds (basically all of it in userspace) with a naive newline. C is about the same with and without explicit buffer flushes, and Python is around 1.8 seconds.

    • @hullukana214
      @hullukana214 3 ชั่วโมงที่ผ่านมา

      @@D0Samp Odd. The c++ code main1.cpp
      #include
      #include
      int main()
      {
      for (uint32_t i = 0; i < (1

    • @hullukana214
      @hullukana214 3 ชั่วโมงที่ผ่านมา

      @@D0Samp So I just wrote a somewhat detailed response and after few minutes I came to make a small edit to it and it seems youtube just deleted it. Maybe if I split it in many comments its not gonna get deleted.

    • @hullukana214
      @hullukana214 3 ชั่วโมงที่ผ่านมา

      @@D0Samp So I have 2 different c++ files. main1.cpp is
      #include
      #include
      int main()
      {
      for (uint32_t i = 0; i < (1

    • @hullukana214
      @hullukana214 3 ชั่วโมงที่ผ่านมา

      @@D0Samp I run them with time ./main1 and time ./main2. Both give basically identical results. User time is about 0.28 seconds and system time is about 1.9-2.2 seconds. Cpu usage is 99%. Total time is about 2.2-2.5 seconds

  • @djsmeguk
    @djsmeguk 4 ชั่วโมงที่ผ่านมา

    5:28 my java heart SCREAMS with JOY. FinbonacciSequenceInitialValueGetterFactory my factory love. ComputeNextFibonacciNumberGivenTwoFibonacciNumbersStrategy should probably be ComputeNextFibonacciNumberGivenTwoFibonacciNumbersStrategyCalculatorFactory though, because you never know ;)

  • @mattcroft
    @mattcroft 3 ชั่วโมงที่ผ่านมา

    12:40 staring from python land at the horror of having to think of such things 😨

  • @FalcoGer
    @FalcoGer 4 ชั่วโมงที่ผ่านมา +1

    @1:55 `for (const auto num : std::ranges::views::iota(0U, 1U

  • @MRAN_XYZ
    @MRAN_XYZ 42 นาทีที่ผ่านมา +1

    That @vsauce 😂

  • @TmOnlineMapper
    @TmOnlineMapper 56 นาทีที่ผ่านมา

    I mean... literally all compiler specifics used here can literally be used in C++ too. And so can preallocating the memory.
    You can even literally calculate the fib number using floating points and powers to get an approximation and use the logarithm on it to get a tight fit for the memory, making it even faster.
    But yeah. Clearly the language's fault and not the programmer's.

  • @maxmustermann5590
    @maxmustermann5590 5 ชั่วโมงที่ผ่านมา

    The casting - void in the fake credits made me spit out my drink lmao

  • @tesseractbedwars
    @tesseractbedwars 7 ชั่วโมงที่ผ่านมา +2

    next video: what is sheafification

  • @Earth_Rim_Roamer
    @Earth_Rim_Roamer 5 ชั่วโมงที่ผ่านมา

    This is entertaining and interesting. Intertainment!

  • @tamamlanmamis
    @tamamlanmamis 4 ชั่วโมงที่ผ่านมา

    Interpreter joke was amazing

  • @rakshitx1
    @rakshitx1 5 นาทีที่ผ่านมา

    10:14 the hate for MSVC🤌🤌🤌

  • @sinewavey
    @sinewavey 4 ชั่วโมงที่ผ่านมา

    Okay, I'm inspired, enough to do this instead of work. How far can I get in 1 second with c++? fun challenge. thanks, I have enjoyed watching your videos lately.

  • @Rerik2k
    @Rerik2k 5 ชั่วโมงที่ผ่านมา

    ayyy a video i could follow along 🎉

  • @lessnightlights8535
    @lessnightlights8535 2 ชั่วโมงที่ผ่านมา

    Hmm my friend says why matmul method is denoted as О (n²), if they remember right it should be ~О(n*log(n))? (he has no hands I type for him)

  • @AK-vx4dy
    @AK-vx4dy 2 ชั่วโมงที่ผ่านมา

    You never dissapoint 🤣

  • @LiveType
    @LiveType 4 ชั่วโมงที่ผ่านมา

    I'm curious how said naive implementation would work in go

  • @AlexV6
    @AlexV6 37 นาทีที่ผ่านมา

    5:03 Can somebody explain how this tweak works?

  • @ZeroPlayerGame
    @ZeroPlayerGame 2 ชั่วโมงที่ผ่านมา

    The de-sheafification of C let's go
    Frankly, i see this as more of a failing of your hand-rolled bignum than anything else. You super don't need a dynamic array. If you know the sizes of two numbers and a basic operation, the pessimistic estimation of how much space the result takes wastes at most 1 word, and you're also using numbers immutably.
    #JustUseGMP

  • @ladislavdobrovsky8826
    @ladislavdobrovsky8826 5 ชั่วโมงที่ผ่านมา

    btw std::vector::swap

  • @velho6298
    @velho6298 4 ชั่วโมงที่ผ่านมา

    How insightful video

  • @dsagman
    @dsagman 2 ชั่วโมงที่ผ่านมา

    good stuff. now write it in web assembly 😂

  • @rarebeeph1783
    @rarebeeph1783 5 ชั่วโมงที่ผ่านมา

    if we're so concerned with what assembly the compiler generates, why don't we just write the assembly directly and skip the middleman?

    • @adiaphoros6842
      @adiaphoros6842 4 ชั่วโมงที่ผ่านมา +1

      Because the assembly written by a compiler often is better than the assembly that you wrote.

    • @gamingdude7959
      @gamingdude7959 4 ชั่วโมงที่ผ่านมา +1

      because u dont know how to write assembly lol

    • @rarebeeph1783
      @rarebeeph1783 7 นาทีที่ผ่านมา

      who said anything about *me* writing it

  • @DiracComb.7585
    @DiracComb.7585 2 ชั่วโมงที่ผ่านมา

    11:23 hahaha, love it

  • @1rez378
    @1rez378 4 ชั่วโมงที่ผ่านมา

    Now use constexpr for 0 computation time

  • @bunniesarecute3135
    @bunniesarecute3135 7 ชั่วโมงที่ผ่านมา

    So how come the python program was still faster if it too flushed the print statements after every line? 🤔

    • @skilz8098
      @skilz8098 6 ชั่วโมงที่ผ่านมา +1

      Some of the Python Libraries or modules that are available for a programmer to use may not be written in Python. They could be written in C. The Python Interpreter itself I believe is primarily written in C. With that, some of the modules that you use may not fully be interpreted by the Python interpreter. Some of it might be directly compiled into C itself and sort of passed through. I'm not a Python Expert, but I've had some experience with it. Then again, that was a little while back around the transition from Python 2.x to 3.x. There's been quite a few changes, updates, and improvements within Python since then. Just like any other language, Python can end up being very slow. Yet if being used right it can be almost as fast as say C/C++, Rust, etc. In general Python itself will never truly be a faster language than C/C++ simply because its interpreter relies on C as far as I am aware of.
      However, if you have one programmer that knows how to use Python very effectively and you have another programmer that doesn't know how to use C/C++, the Python Programmer will be able to generate a code base that will outperform that C/C++ programmer 9 out of 10 times. Now if you have two programmers of the same quality and integrity both writing efficient and performant code in both languages, 9 out of 10 times, the C/C++ code is going to be more efficient if performance is their main goal. Finally, if you have a programmer that can write extremely efficient and performant C/C++ code, and another programmer that writes bad Python code. It's going to be a landslide every time.

    • @D0Samp
      @D0Samp 4 ชั่วโมงที่ผ่านมา +1

      Because it doesn't. The default Python sys.stdout object is a text-encoding wrapper around a buffered binary writer around the operating system's low-level representation of a file.

    • @stefanalecu9532
      @stefanalecu9532 3 ชั่วโมงที่ผ่านมา

      Python's range is implemented in C, doing that loop as you would in C++ (perhaps with a while loop) would be even slower than the original C++ endl version. And also what the messages above me have said

  • @xorcise
    @xorcise 5 ชั่วโมงที่ผ่านมา

    5:20 this is why oop v trad is
    is python or casm faster
    be cause duality

    • @xorcise
      @xorcise 5 ชั่วโมงที่ผ่านมา

      5:30

    • @stefanalecu9532
      @stefanalecu9532 3 ชั่วโมงที่ผ่านมา

      you almost made sense

  • @borisdorofeev5602
    @borisdorofeev5602 7 นาทีที่ผ่านมา

    0:10 RIP

  • @ShadowKestrel
    @ShadowKestrel 3 ชั่วโมงที่ผ่านมา

    tis indeed just a prank, bruv

  • @xorcise
    @xorcise 5 ชั่วโมงที่ผ่านมา

    7:15 i just realized you speak in python i speak in asm

  • @venkyman4985
    @venkyman4985 2 ชั่วโมงที่ผ่านมา

    Whats "Tsuzuku" ?

  • @hatsuneadc
    @hatsuneadc 4 ชั่วโมงที่ผ่านมา

    Why does your shell look like a greentext lmao

  • @dimchen99
    @dimchen99 6 ชั่วโมงที่ผ่านมา

    the answer is 11. Or 23. I haven't watched the video

  • @xorcise
    @xorcise 5 ชั่วโมงที่ผ่านมา

    also love
    much love

  • @ppppppppppppppppppppppp7
    @ppppppppppppppppppppppp7 4 ชั่วโมงที่ผ่านมา

    imagine if instead of c++ it was called g++ 😂😂😂😂😂😂😂😂😂😂😂😂

  • @qexat
    @qexat 5 ชั่วโมงที่ผ่านมา

    yay new (g⁺)⁺ video

  • @tiborgrun6963
    @tiborgrun6963 2 ชั่วโมงที่ผ่านมา

    I would like to inform you that your video fell victim to TH-cam's autotranslation feature that prevents me from reading the English titles of your videos. If it is in any way possible to deactivate this feature from your side, it would be much appreciated.

  • @beaverbuoy3011
    @beaverbuoy3011 7 ชั่วโมงที่ผ่านมา

    Ooh!

  • @rogergalindo7318
    @rogergalindo7318 4 ชั่วโมงที่ผ่านมา

    lol this vid is amazing

  • @acatfrompoland5230
    @acatfrompoland5230 5 ชั่วโมงที่ผ่านมา +3

    Not satisfied with this video

  • @danser_theplayer01
    @danser_theplayer01 30 นาทีที่ผ่านมา

    In javascript the code is just english, but big capital made it fast af boy. So I believe python literally has no reason to exist with it's cringe whitespace syntax and discarding of language versions (javascript runs the web so it promises backwards compatibility).

    • @AlexV6
      @AlexV6 3 นาทีที่ผ่านมา

      You are clearly confused and stressed, probably it's because you had to write all those nasty semicolons and curly braces... 🤭

  • @stolenlaptop
    @stolenlaptop 6 ชั่วโมงที่ผ่านมา +3

    As a c bro im laughing at the c++

  • @xorcise
    @xorcise 5 ชั่วโมงที่ผ่านมา +1

    5:20 no such word as prog no sis
    pro gn os is
    pro gnosis
    like a gnostic
    agnostic a gn os tic
    or mb a gn os t ic idk where the t goes
    like pre gn ant
    there is no preg nant
    but you say std and endl
    shudder

  • @theevilcottonball
    @theevilcottonball 7 ชั่วโมงที่ผ่านมา +2

    There is a explicit formula to compute the nth fibonacci number without computing its predecessors.

    • @JPK314
      @JPK314 6 ชั่วโมงที่ผ่านมา +5

      Ha! Laugh at this person. They did not watch the soft requirement video preceding this one.

    • @theevilcottonball
      @theevilcottonball 4 ชั่วโมงที่ผ่านมา +2

      @JPK314 Exactly. I did not. Go on. Laugh at people who don't watch a video.

  • @TheNovakon
    @TheNovakon 6 ชั่วโมงที่ผ่านมา +2

    Oh man, don't make it any more awkward. Just learn C++.

    • @mage3690
      @mage3690 5 ชั่วโมงที่ผ่านมา

      C(23) better for this. `_BitInt( )` tells the compiler what you want more explicitly and is much faster than a malloced array of __int128s. Hell, just using alloca could probably speed this up something fierce simply due to cache locality. I don't _know_ that he ever allocates more than 4 KiB for his program to use, but if he does, that's probably the weird spike halfway up the chart right before it becomes slightly more chaotic.

    • @stefanalecu9532
      @stefanalecu9532 3 ชั่วโมงที่ผ่านมา +2

      this whole video comes down to "I can't be bothered to know about C++, let me make a 17 min long video malding about how Python overtook me cuz I can write complex classes but can't use std::move"

  • @Malware.id_Void
    @Malware.id_Void 6 ชั่วโมงที่ผ่านมา

    rust is simpler then c++ but is just as fast mmm it could of been simple from the start 1:56

    • @stefanalecu9532
      @stefanalecu9532 3 ชั่วโมงที่ผ่านมา

      "rust is simpler than* c++"
      yeah, sure buddy, keep dreaming

  • @Rubikorigami
    @Rubikorigami 2 ชั่วโมงที่ผ่านมา

    aaaaaaaaaaaa why is youtube pushing sh*tty AI-generated French audio translation tracks by default please mr. video tell me that you can turn that stuff off 🫣