wholesomepotato

Joined 3 years ago

Karma
115
Submissions
49
Member since
Sep 8
View on Hacker News

Recent submissions

Comment · 2 years ago
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.
Comment · 2 years ago
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).

Comment · 2 years ago
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.
Comment · 2 years ago
Might be wrong but this shortcut corrupts the lower bits with garbage from the higher byte.

The lookup table can detect some, but not all errors, so yeah, it relies on valid input.

Comment · 2 years ago
Yes, but also - they lie about the inflation and force the public to hold the bonds anyway (aka. financial repression, yield curve control).
Comment · 2 years ago
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.

Comment · 2 years ago
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 ...

Comment · 2 years ago
it's one XOR, SHL, OR, SHR, AND, on some archs the shifts might come free with the other instruction. I'd expect it to be faster.

a = v ^ 0x30303030lu // normalize to digits 0xXX0a0b0c

b = (a << 12) | a // combine into XXXXXbacb0c

idx = (b >> 12) & 0xfff // get bac

res = lookup[idx]

Comment · 2 years ago
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.

Comment · 2 years ago
Exxon is a private company so some basic level of competency can be assumed. The Fed is basically bunch of incompetent academic buffoons.
Comment · 2 years ago
Would use XOR 0x30303030lu, then OR with a value shifted left 12 bits, take bits 24..12 and lookup in 4k pre-computed lookup array.
Comment · 2 years ago
This needs to be said: Every single thing Poettering touched was huge improvement. A great hero of Linux userspace architecture.
Comment · 2 years ago
> In an infinite world of abundance ...

:D

Comment · 3 years ago
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.
Comment · 3 years ago
Public discourse was and should always be in the private domain. Anything else is totalitarianism by definition.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton