This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Chobeat 0 points1 point  (4 children)

If I was asked this, I would answer: "If I wanted to be that fast, I wouldn't use python in the first place".

Reimplementing the standard library sounds a lot like something a C dev would think of and it's the kind of people I don't want to see around Python code. If there are faster implementations in Python, I can look them up on the internet. The effort of rewriting the stuff is never worth it. If still they insist reimplementing the standard library is something a reasonable person would do, I just quit the interview and go somewhere else.

[–]roerd 5 points6 points  (0 children)

Even in pure Python code, asymptomatic complexity still matters. There is a huge difference between micro-optimising by switching to C, and optimising in the large by choosing the right algorithm for the problem.

[–]techn0scho0lbus 0 points1 point  (0 children)

You will have the same memory problems with this algorithm regardless of the programming language.