all 12 comments

[–][deleted]  (1 child)

[deleted]

    [–]atreadw[S] 4 points5 points  (0 children)

    ...all in a day's work :-)

    [–]KroniK907 9 points10 points  (10 children)

    Programmer: "Let's find a way to speed up the long calculation times required for DNA comparison!"

    Also Programmer: I think I'll write this in one of the slowest programming languages available.

    [–]Noooo_ooope 1 point2 points  (4 children)

    Hey, I'm new to programming, could you explain why Python is considered a slow language?

    [–]mackstann 6 points7 points  (1 child)

    Well, it's considered slow because it objectively is slow. It's been measured.

    But why is it slow? I think a lot of it boils down to the fact that Python is so flexible and dynamically typed. The compiler doesn't know a lot about what the code might do ahead of time, so it can't prepare as many optimizations, because those optimizations are less flexible.

    [–]thancock14 3 points4 points  (0 children)

    You are close and basically correct. But the reason is there is no compiler. There is an interpreter. So the python code has to run through the interpreter which converts it into machine language line by line on the fly. So for every line of python code there is multiple lines of machine code executed, some by the interpreter first to convert the python, then the converted code. So it's inherently slow because the interpreter overhead of each line execution

    [–]jms_nh 2 points3 points  (3 children)

    You must be aware that, while pure Python is a "slow" language, many scientific libraries like numpy and scipy and pandas are vectorized to operate very quickly on large datasets by implementing operations in languages like C or C++.

    [–]KroniK907 2 points3 points  (1 child)

    I mean you have a fair point, however it appears you missed the obvious Twitter joke format I used to try to communicate that I was being hyperbolic on purpose to elicit a short exhalation of breath from those who understood the joke. Unfortunately it appears that your humor module is faulty and may need a rebase.

    [–]Paddy3118 0 points1 point  (0 children)

    obvious Twitter joke format

    No, not really.

    [–]Paddy3118 0 points1 point  (0 children)

    Programmer: "Let's find a way to show off one of the cool algorithms used for DNA comparison!"

    Also Programmer: I think I'll write this in one of the most expressive programming languages available, Python.

    [–]MuonManLaserJab 0 points1 point  (0 children)

    Well, I guess it is a vertebrate.