Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This attitude is how we get streaming music players that consume in excess of 1 GiB of RAM.

Performant code needn’t be unclean; it’s just often using deeper parts of the language.

I have a small project that became absolute spaghetti. I rewrote it to be modular, using lots of classes, inheritance, etc. It was then slower, but eminently more maintainable and extensible. I’m addressing that by using more advanced features of the language (Python), like MemoryView for IPC between the C libraries it calls. I don’t consider this unclean, but it’s certainly not something you’re likely to find on a Medium article or Twitter take.

I value performant code above nearly everything else. I’m doing this for me, there are no other maintainers, and it’s what I enjoy. You’re welcome to prioritize something else in your projects, but it doesn’t make other viewpoints objectively worse.



Performant code does not need to be unclean, exactly! My original point was just to not put performance on a pedestal. Sure, prioritize it, but correct and clean should come first - at least for foundational libraries that others are supposed to build upon.

I maintain ML libraries that run on microcontrollers with kilobytes of memory, performance is a friend of mine ;)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: