HACKER Q&A
📣 arthurcolle

Have a code performance-oriented interview Monday. Tips?


I have an interview on Monday, which, according to some advice from previous interviewees and the recruiter, will involve taking some existing Python code and some existing SQL code, and then use libraries like numpy and pandas to 'improve the performance' (for the Python section) and probably just standard SQL performance questions for the SQL part.

I mostly use the libraries in their desired manner and so not sure if it will be like a "terrible performance pandas code" and then try to locate how it is mis-using the APIs, or if it is just plain vanilla python code and then figuring out how to improve it with the library APIs.

For now I am pretty focused on preparing for the Python aspect.

I have a pretty workable understanding of vectorization, but are there any other things of note that you would want a candidate to know specifically in terms of improving the performance of running code in the context of these specific tools in the toolbelt?

What would you make sure to cover if you were the interviewer, asking a candidate to demonstrate understanding of these libraries in the context of writing performance-oriented code?


  👤 strangattractor Accepted Answer ✓
Sounds like a dumb interview. Are you sure you want to work there? How can you do any of this if you have never used the libraries. Else it must be so simple and obvious (at least to the interviewer) that they think it is a no brainer. Likely they want you to unwind some loops and use some of Pandas Vectorized routines. But as this article states https://pythonspeed.com/articles/pandas-vectorization/ that is not always easy to do. It takes a lot of work to get good performance. Improve SQL performance - which one? Mysql, Postgres, etc. Sounds like an interview designed by an engineer.

👤 2143
I don't have advice, but once the interview is over come back here to tell us how it went so that it'll be useful to the next person.

Good luck!


👤 freemint
How did it go?