Recent submissions

Comment · 1 hour ago
Branchless programming is a thing because those don't work, and branch prediction hurts performance on many cases
Comment · 1 hour ago
An use of SIMD in x86 is fast ram copy/filling by sending all Avx register to ram with one instruction.

But I'm thinking more about having multiple logical CPUs, ALUs, or ports working on a single giant register. I think SIMD wastes a lot of hardware.

Example: radix sort needs to calculate a prefix sum. As the sum accumulates, it requires more bits, so the bit length should be adjustable. On x86, you can cast an array of bytes to a uint64_t and calculate eight prefix sums with a single multiplication. But eventually, you run into SWAR lane overflow problems. Ask an AI what this means and how the code works.

We need a CPU designed to handle lane overflow and dynamically adapt bit lengths, so at the start we do more parallel sums with less bits, and as the sum accumulate we increase the bit length gradually. This is just a simple use case. We could store more prefix sums as a periodic sum more deltas.

Comment · 1 hour ago
Select my post, right click, press search, and Google ai will explain to you basic stuff about branchless programming that you should know already.
Comment · 1 hour ago
There are use cases where branch prediction performs better and others where it performs worse. Ask an AI about branchless programming and when it can improve performance. We need both types of CPU instructions to achieve optimal performance.
Comment · 2 hours ago
The factorial can be calculated using a Taylor series, whose individual terms can be calculated and summed in parallel.
Comment · 2 hours ago
Language models are efficient because they are trained with millions of examples that don't exist for newer architectures, and they are still mediocre to bad on stuff where they hadn't been trained
Comment · 2 hours ago
As a programmer, I always wanted a cpu which instead of having n 64 bit registers, had a single register with 2^m bits, which could be split in arbitrary length sub registers, not all the same size, and could be treated as an array of bits, or a swar machine
Comment · 10 hours ago
The brach predictor it's the bane of programmers. It forces to waste effort to write unreadable branchless code.

X86 should support no-branch-predict-if and dont-predict-goto

Comment · 10 hours ago
Home appliances should use open standards, allowing anyone to use any software to control them, including their firmware.
Comment · 14 hours ago
You move n/2, then n/4,...n/2^-i

n. Sum(2^-i)=n

So its o(n. Log(n))

Comment · 18 hours ago
Nazis are as socialist as the communists. There is no practical difference between a nazi and a socialist. They just use different words to do the same things.

Marxism is all about manipulating words.

Comment · 18 hours ago
Free market prices are a valuation of costs to society. It's the valuation that produces the best results. Humanity doesn't knows a better one.

Twisted and myope logic is the concepts of price and value that socialists have. That's why socialism always fail: socialist don't understand the value of things.

The proof is the experimental results: life is always better in capitalist countries, and socialist always escape from socialism towards capitalism. Even socialists don't want to migrate to cuba or Venezuela.

Marxism is twisted and myope because Marxist define Marxism as the rejection of logic. Your Marxist posture is incompatible with reason.

Comment · 1 day ago
I got a laptop cpu in a desktop motherboard (a mini PC board). It was cheaper, and performs much better that the same cpu in a laptop. It was a steal. It's like shucking an hdd, an incredible value for the price.
Comment · 1 day ago
Your argument is that "essential services" have infinite value, and that's false.

Because value is relative to other valued things.

Resources are limited, so what you spend on "essential services" cannot be spent on other things.

Healthcare is "essential", but if you spend 100% of resources in healthcare, it will never be enough. You can spend billions to keep alive a person more minutes, and he will die anyways, but society would lose all housing, all food, all clothing, and would be miserable, so healthcare doesn't had infinite value.

If you find any "essential services" too expensive, is because you need other things more important, like having food or a house.

If the state pays for "free" healthcare, it has no limit to spending, and you cannot more get a house, food, clothing, or anything else.

That's why "essential services" have a price, like anything else, and should be restricted to be profitable.

Profit means that the value produced is higher than the cost, because the cost are other things that you need more.

Comment · 1 day ago
YES, "people paying 3 means the item is actually objectively worth 3", because labor is not the value of the cake minus other costs.

You can spend exactly the same labor building the cake or smashing trash, but the smashed trash is not worth the same as the cake despite spending the same labor, so the labor value doesn't explain the value of the product.

You pay 3 for a. Ake only if you value what you buy more than what you pay, so you win by buying. Otherwise you would not buy. The seller had no power on how much you value it, so you decide how much is the cake valued when you decide to pay or not pay for it. That's independent of the cost of manufacturing. You don't care how much it had cost something you buy in the supermarket. You don't even know. You decide by judging if you are better buying it or something else you could get with that money.

Prices are created by consumers and represent priorities, not absolute value.

Because the value of things is decided by consumers, the value is independent of the cost of production, and for that reason is a lie that the difference between value and cost is the labor.

If labor were worth the difference between product value and cost, it would not be justified to produce anything, because at the end of day, nothing would be won by working. The final value would be the same than at the start of the day. It only makes sense to work if the final product is more valuable than what was spent, including labor.

Labor has limited value. You decide if you spend your labor cleaning your room, or if you are better doing nothing, or playing a videogame, because your labor has a limited value. You would not do any work if the benefit is smaller that the value of your work.

If labor were worth the final value . Minus other cost, you could not decide were to work. You would spend the same labor building a pile of trash or something more productive. A car would be worth the same as a pile of trash, despite requiring the same labor.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton