"Python is slow."

Поделиться
HTML-код
  • Опубликовано: 18 ноя 2024

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

  • @Crusage
    @Crusage 6 месяцев назад +3

    Python isn't exactly "slow", it's just a lot *slower* than other languages.

  • @ac1dra1n
    @ac1dra1n 6 месяцев назад +17

    i think the bottleneck here isn't the language its the fact you're printing the output

    • @felos9274
      @felos9274 6 месяцев назад

      wait im confused, what do you mean by that?

    • @CallMeSirEntertainment
      @CallMeSirEntertainment  6 месяцев назад +1

      @felos9274 I was thinking the same thing

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

      @@felos9274 Converting very large numbers from their internal binary representation to decimal format is very slow in any language. It may take longer to display the result than to calculate it.

    • @mommyshark69
      @mommyshark69 6 месяцев назад

      yes, acidrain is correct. printing a lot of information in the output REALLY slows down the application. try running a chronometer on the side with and without the output, you will see the difference

    • @ac1dra1n
      @ac1dra1n 6 месяцев назад +2

      @@CallMeSirEntertainment example one for loop in C, 1 to 10000000 printf: 13 seconds
      example two without the printf: 26ms
      the reason for this is because each iteration is doing a call that involves moving buffered data to an output window that has a limit on how fast it can display the data, and the limit is much slower than the raw computation. the loop doesn't iterate until the display output has occured and the display output is slow depending on things like 'baudrate' or other performance limits of the console.

  • @pugqueen88
    @pugqueen88 6 месяцев назад +2

    Less than a minute I’d say is pretty quick!😌✨Not slow at all!!

  • @harshbakori
    @harshbakori 6 месяцев назад +1

    not slow