4 ms·
code has a bigger upfront cost but after the initial investment it's all profit. Servers can also go down, but the 100x faster code will remain the same.
by bryanrasmussen 6y ago
code has a bigger upfront cost but after the initial investment it's all profit.
Servers can also go down, but the 100x faster code will remain the same.
- mrmrcoleman 6y agoIf the code has been optimized to the point of being illegible/difficult for others to maintain then, assuming you’d like to update that code at some point, you’ll need to pay for that too.
- midrus 6y agoThat's under the assumption that code doesn't have to be maintained, updated with new features, and that writing it on any programming language has the same cost. Otherwise we would all be writing assembler. Humans are way, way more expensive than servers in almost every case. Exceptions might be small pieces of code ran by millons of devices, but that's far from being the common case.
- otabdeveloper4 6y agoAssembly is expensive because you have you re-write your code every time your architecture changes.
- makapuf 6y agoArchitecture (x86_64 or arm on mobile) hasnt changed in decades. The way to optimize for it changes in years but you get a slightly less optimized version. Im sure software written in 2007 in assemble for linux pc works now, and fast. I think assembly is not cheap because the language is tiny, offers no abstraction and youre on your own for everything, not because of arch turnover.
- satyrnein 6y agoMost likely, squeezing 100x performance out of your code will significantly complicate it. For example, you're probably going to be dealing with cache invalidation a lot, and you will pay for that complexity forever, as you try to build new features.
- ficklepickle 6y agoIt depends on the baseline, I suppose. I could see code written (poorly) in a dynamic language to be 100x slower than necessary. Maybe it was fast enough when written, so nobody looked too hard. Inefficient DB queries, excessive IO. But I agree with the sentiment. In a code base where performance matters, that level of optimization would often be impractical.
- throwaway189262 6y agoIt depends. In many benchmarks Java is 50X faster than Ruby. So having code 100X as fast can just mean choose a fast language and framework for your project