Instruction level parallelism will make extra shift free. Other than this it needs to be benched and might depend on cpu/arch. I don't care enough to bench and optimize further.
I think you're right. Even better. Did you have time to bench it, etc.?
I see what you mean by length. I just skimmed over the text originally as I don't have time for rather lame problems like this. I'd just add 3 bits of length to be part of the index, job done. 12KB lookup table instead of 4KB, assuming 0 is not a valid value (negate to avoid needing 0b11).
It's unclear what is in the highest byte, so I assume not 0x000x0y0z, but 0xab0x0y0z where ab is unknown (in the past comment I used XX for this). If highest byte is known, then sure, even better.
I'm sorry but most of your comment has nothing to do to what I said, and seems like random rambling. Except:
> 3.2% is absolutely peanuts to what it was some 3-4 decades ago.
But 3-4 decades ago governments, all institutions and economy as as whole were not so much in debt. https://fred.stlouisfed.org/series/GFDEGDQ188S . And this chart doesn't include all the "unfunded liabilities".
You can hike rates to curb the inflation only if it doesn't bankrupt everything and everyone.
And 3-4 decades ago boomers globally were ahead of most productive years of their lives, without the "baggage" of tons of kids and globalization had plenty of room ahead to increase productivity.
I don't want to waste time talking about nonsense like AI and "space exploration". The financial system is screwed. That's all I'm saying.
What's amazing about it if the debt increased more in the absolute terms? :D . If I max out credit cards I can at least show spending (GDP) growth at least the same as what I borrowed...
How is it not obvious to everyone that this is the end game? Increasing rates will rapidly increase debt, which increases inflation, which pushes increasing rates ...
What products/services they produce if they're private?
They're in this sweet spot where they're neither held accountable by the voter, nor by the consumer.
The can be wrong over and over and over again and nothing is going to happen. A private company has to at least not loose more money then they can bribe politicians to give them.
Features of modern CPUs don't really prevent them from real time usage, afaik. As long as something is bounded and can be reasoned about it can be used to build a real time system. You can always assume no cache hits and alikes, maximum load etc and as long as you can put a bound on the time it will take, you're good to go.
The do increase shareholder value, just in exactly short-term. The problem with publicly traded companies is not as much wanting to increase the value, but how short is the time horizon, when most owners don't have any understanding of the bussiness other than just handful of numbers every quarter.