80's tech flashback

[)roi(];21682055 said:
Yeah I have my doubts on that; without specifics it's hard to imagine many scenarios that these non asm solutions are demonstratively inefficient to the extent that asm is the only solution.

If compilers could generate perfect code, there would be no need for anyone to work on compiler optimizations. Yet, every release of a compiler lists new optimization improvements. Furthermore, without the proper language constructs, there is no way to express to the compiler exactly what needs to be optimized. All you really have to do is imagine a scenario, where performance is money. Classic examples are high speed trading, drivers and supercomputing.
 
[)roi(];21682201 said:
The fun part I don't doubt; so too the edge cases where its justified, but day to day our time is better spent focusing on building code that is easy to test and maintain.

It;s a fine line, also readability over speed ie: linq
 
If compilers could generate perfect code, there would be no need for anyone to work on compiler optimizations. Yet, every release of a compiler lists new optimization improvements. Furthermore, without the proper language constructs, there is no way to express to the compiler exactly what needs to be optimized. All you really have to do is imagine a scenario, where performance is money. Classic examples are high speed trading, drivers and supercomputing.
For the most part or "97%" micro optimisations are rarely the primary counter balance between success or disaster; especially in the greater scope of a typical project; but I can appreciate that in certain niche areas e.g. trading (which is certainly out of my depth), that shaving milliseconds can mean the difference between losing / winning trades, as this article implies:
https://www.popularmechanics.com/te...ble-to-shave-5-milliseconds-off-stock-trades/

...and I guess with AI involved, the time taken to traverse an edge becomes no less important than optimising the route between them. Sounds like fun...
 
Last edited:
It;s a fine line, also readability over speed ie: linq
In the case of something like linq, micro optimisations of this proportion is rarely the reason for slow processing; from experience its far more likely to be a lack of composition, and / or the inefficiency of algorithm, ...

...and yes readability plays a far greater factor in maintenance than for example: the effectiveness of the underlying compiler's code optimizer.
 
Last edited:
xor ax,ax

If you know why then you're old like me. ;)

Faster (and smaller) set-zero than mov. :) Btw, on current hardware a xor of a register with itself is "free" - no pipeline resources are used, it knows to treat the next read of the register as a zero.
 
Top
Sign up to the MyBroadband newsletter
X