3 ms·
Having optimized others code before. https://magento.stackexchange.com/a/13992/69 https://magento.stackexchange.com/a/13992/69 Those who slam spaghetti code.
by molotovbliss 8y ago
Having optimized others code before.
https://magento.stackexchange.com/a/13992/69 https://magento.stackexchange.com/a/13992/69
Those who slam spaghetti code. Posit: Lasagna is just spaghetti flavored cake. Too many abstracted layers to fulfill a request. Down the layers, & back up, just to fulfill a simple request.
Autoloading can be expensive as well for I/O until cache is involved, especially with large code pools. Caching isn't optimization.
Trim the fat, reduce layers, use leaner pasta & or less special sauce.
If you've started tweaking costs/time from the ingredients & cooking process (lower level, OS, daemons, etc.) to start then move onto frameworks/libraries; it's less to consume & healthier. Ie., cache invalidation is much faster which should be at the end of your optimization journey.
Fundamentals are being abstracted away daily, while it's great for rapid prototyping & easier maintenance of code. It's imperative to understand problem spaces before delivering a solution.
A very highly recommended book is:
The Elements of Computing Systems: Building a Modern Computer from First Principles
https://www.amazon.com/dp/B004HHORGA/ref=cm_sw_r_cp_awdb_t1_RP5oBbNNR5SM3 https://www.amazon.com/dp/B004HHORGA/ref=cm_sw_r_cp_awdb_t1_...
The demo scene is a very good example to attempt to mimic with the culture of optimization. It's been bragging rights way early on. https://www.pouet.net/ https://www.pouet.net/ granted hardware is much faster than it was back in the olden days. But a quick note from admiring their creations you get a taste for older hardware & milking every cycle you can. Maybe forcing younger up & coming devs to use older hardware means they'll appreciate it more & you'll know on current hardware it'll fly.
Another thing to think of is the von Neumann bottleneck & how it was solved (partially) with cache levels or Harvard architecture. I/O is a basis for optimization.
"There's no sense in being precise when you don't even know what you're talking about."
https://en.wikipedia.org/wiki/Von_Neumann_architecture https://en.wikipedia.org/wiki/Von_Neumann_architecture
With all of the above said, I'm agreeing whole heatedly with the article & yourself as it's nice to see others focused on this as it seems to be a dieing breed.
I'll leave this here for web developers:
http://motherfuckingwebsite.com http://motherfuckingwebsite.com