3 ms·
Don't follow this editorialized title's advice if you'd actually like to become an expert [1]. The actual article is quite good and makes a very valid point. D
by benjamincburns 13y ago
Don't follow this editorialized title's advice if you'd actually like to become an expert [1].
The actual article is quite good and makes a very valid point. Don't jump to machine code whenever things get a bit slow, chances are you're introducing more problems than you're fixing, and it's very difficult to outdo the compiler. Generally you should start by looking for macro-optimizations instead. But to add my own advice, it's still an incredibly worthwhile thing to learn, even if you don't expect to ever run into the types of scenarios which will benefit from optimization at this level.
Why? Programming languages do everything they can to abstract away the machine, and abstractions do leak [1]. Even mostly air-tight abstractions over machine code [2]. Because of this, learning the entire "stack" makes debugging higher-level code much easier. When you can understand what's happening with every level right down to the metal, what were once ridiculous off-the-wall problems become recognizable and much easier to reason about.
So do use machine code if you'd like to become an expert. Just use it on your own time, and don't use it under duress.
1: Presently reads "Don't use assembly unless you're an expert."
2: http://www.joelonsoftware.com/articles/LeakyAbstractions.html http://www.joelonsoftware.com/articles/LeakyAbstractions.htm...
3: http://stackoverflow.com/questions/11227809/why-is-processing-a-sorted-array-faster-than-an-unsorted-array http://stackoverflow.com/questions/11227809/why-is-processin...
- elwell 13y ago> The title of this post was obviously meant to be an attention-grabber It's becoming very common to have a catchy title and then a disclaimer for it in the article.
- benjamincburns 13y agoA trend which is both tempting and annoying. I have a feeling that this is causing some people to develop an analogue to "advertisement blindness" where people tend to ignore titles which fit into certain models. I think the filter gets tripped for me any time people use overly emotional modifier words, the word "this," or the phrase "what happens next." This title didn't fit any of those, however.