it is more about just remembering it as foundation knowledge.
For example, this last week I worked on several back end services for a new public facing website that I know could get high traffic.
My simple solutions to many of the data processing problems was using C#'s LINQ, even though in the back of my head I knew that using an explicit loop might solve the problems faster.
This just serves as a reminder that it can be good to revisit these smaller bits and pieces of code if you are interested in getting better performance.
I've fixed huge, large bottlenecks of speed before. Those are typically easy to diagnose and find.
The harder thing to do is optimize 10, 20, 30 different services or loops or functions such that each one is maybe 10-20% faster, but has huge benefits to the app in general if you address all of them. Sometimes just replacing a nice language feature with a loop can do that.
-5
u/hugogrant May 25 '19
Ngl, this is a bit extra...
An interesting comparison, but unless all a project does is sum squared floats, this isn't all that guiding.
People shouldn't believe that this means that imperative is faster because of things like maintenance costs.