News for hackers. Stuff that matters.
Re:The computers are fast, but you don't know it by forinti on Thursday June 16, 2022 @03:27PM (#31769936)
On a 3GHz CPU, one clock cycle is enough time for light to travel only 10cm.

If you hold up a sign with, say, a multiplication, a CPU will produce the result before light reaches a person a few metres away.

Re:The computers are fast, but you don't know it by dragontamer on Thursday June 16, 2022 @03:51PM (#31770144)
> If you hold up a sign with, say, a multiplication, a CPU will produce the result before light reaches a person a few metres away.

The latency on multiplication (register input to register output) is 5-clock ticks, and many computers are 4GHz or 5GHz these days.

5-clock cycles at 5GHz is 1ns, which is 30-centimeters of light travel.

If we include L1 cache read and L1 cache write, IIRC its 4 clock cycles for read + 4 more for the write. So 13 clock ticks, which is almost 70 centimeters.

------------

DDR4 read and L1 cache write will add 50 nanoseconds (~250 cycles) of delay, and we're up to 13 meters.

And now you know why cache exists, otherwise computers will be waiting on DDR4 RAM all day, rather than doing work.

Re:The computers are fast, but you don't know it by moonchild on Thursday June 16, 2022 @04:27PM (#31770574)
> The latency on multiplication (register input to register output) is 5-clock ticks

3

https://www.agner.org/optimize/instruction_tables.pdf

Re:The computers are fast, but you don't know it by jiggawatts on Thursday June 16, 2022 @06:18PM (#31771709)
Back in the days, an integer division took something like 46 clocks (original Pentium), and now on Ice Lake it's just 12 with a reciprocal throughput of 6. Multiply that by the clock speed increase and a modern CPU can "do division" about 300-400 times faster than a Pentium could. Then multiply that by the number of cores available now versus just one core, and that increases to about 2000 times faster!

I used to play 3D games on Pentium-based machines and I thought of them as a "huge upgrade" from 486, which in turn were a huge upgrade from 286, etc...

Now, people with Ice Lake CPUs in their laptops and servers complain that things are slow.

Re:The computers are fast, but you don't know it by bouke on Friday June 17, 2022 @01:05AM (#31774310)
And things are slow as we waste all that processing power on running javascript one way or another. And everything requires a slow blocking connection to the mainframe. Nowadays the “always connected” mindset is really slowing us down.
Re:The computers are fast, but you don't know it by onion2k on Friday June 17, 2022 @01:57AM (#31774556)
That explains why Electron apps and Web pages are slow but the post you're replying to is about games...
Re:The computers are fast, but you don't know it by bouke on Friday June 17, 2022 @02:03AM (#31774589)
Ok fair enough, but the mindset is spreading: json (javascript) parsing is what caused GTA Online loading times to balloon and I dread playing Call of Duty online as it wants to download and install dozens of GBs every time I launch it.
Re:The computers are fast, but you don't know it by wruza on Friday June 17, 2022 @03:11AM (#31775024)
It wasn’t json parsing per se, but a buggy roll-your-own implementation that used a function (sscanf iirc) with a surprising nontrivial complexity on a long string. Fun part is, if they just outsourced that load to javascript and its JSON.parse, they’d never encounter that exponential slowdown. Javascript is a nice target to blame, but it isn’t the problem. CPUs got hundreds of times faster, javascript only divides it by N, which stays low and constant (at least) through decades. Do you really believe that if browsers only supported MSVC++-based DLLs without scripting, sites would run faster? That would be naive.
Re:The computers are fast, but you don't know it by jiggawatts on Friday June 17, 2022 @06:52AM (#31776383)
You may be thinking of GTA Online, but the point is still valid.
Re:The computers are fast, but you don't know it by fennecfoxy on Friday June 17, 2022 @07:16AM (#31776566)
Games do use JS, some UIs actually render using a webview (Unity etc is capable of this)
Re:The computers are fast, but you don't know it by jcranberry on Friday June 17, 2022 @09:48AM (#31778099)
I didn't see anyone complaining about games in the parent comments.
Re:The computers are fast, but you don't know it by fennecfoxy on Friday June 17, 2022 @07:19AM (#31776586)
Afaik much JS these days is optimised, see things like V8's turbofan https://v8.dev/blog/turbofan-jit

However there is definitely still less intrinsic optimisation from a dev perspective I think - people will iterate over the same array multiple times in different places rather than do it once.

I guess our industry has decided moving faster is better than running faster for a lot of stuff.

Re:The computers are fast, but you don't know it by taneq on Friday June 17, 2022 @01:17AM (#31774367)
Part of the reason computers seem slower than they did is that most programs (and most programmers) only use one of those cores. Most of the reason, though, is that programmers buy new computers, and also that programmers only optimise code that’s slow on their computer.
Re:The computers are fast, but you don't know it by jnordwick on Thursday June 16, 2022 @05:54PM (#31771469)
Those insrtruction latencies are in addition to the pipeline created latency. (They are actually the number of cycles added to the dependency chain specifically). The mult port has a small pipeline itself of 3 stages (that why 3 cycles latency). Intel has a 5 stage pipeline so the minimum latency is going to be 8 for just those two things.
Re:The computers are fast, but you don't know it by gpderetta on Friday June 17, 2022 @03:20AM (#31775090)
I don't understand what you are trying to say. The dependency chain length is what is normally intended as instruction latency.

Also the pipeline length is certainly not 5 stages but more like 20-30.

Re:The computers are fast, but you don't know it by jnordwick on Friday June 17, 2022 @05:54AM (#31776058)
Sorry, I dropped all the 1s in that message when i typed it (laptop keyboard is a little sketchy right now). That should have been 15 and 18. I think the recent Intel microarchs take 14 plus howewever long at uopd decoding that minimum 1, so 15-20 or close to that.

> The dependency chain length is what is normally intended as instruction latency.

Yes, the way I read the original post and others was that you actually your response back in 3 cycles, which isn't correct. It doesn't get comitted for a while (but following instructions can use the result even if it hasn't been committed yet). You're not getting a result in less than 20 cycles basically.

Re:The computers are fast, but you don't know it by gpderetta on Friday June 17, 2022 @07:26AM (#31776631)
> Sorry, I dropped all the 1s in that message when i typed it

It makes sense now! :D

> You're not getting a result in less than 20 cycles basically

But the end of the pipeline is an arbitrary point. It will take a few more cycles to get to L1 (when it makes it out of the write buffer), a few tens more to traverse the L2 and L3 and hundreds to get to RAM (if it gets there at all). If it has to get to an human it will take thousands of cycles to get through the various busses to a screen or similar.

The only reasonably useful latency measure is what it takes for the value to be ready to be consumed by the next instruction, which is indeed 3-5 cycles depending to the specific microarchitecture.

Re:The computers are fast, but you don't know it by jnordwick on Sunday June 19, 2022 @06:36AM (#31798081)
> which is indeed 3-5 cycles depending to the specific microarchitecture

I assume you are talking about from fetch to hitting the store buffer? That would be the aabsolute min time before the data could be seen elsehwere I would think. It can still potentially be rolled back, and that would be higher than reciprocal be way too fast to sustain, but for a single instr burst, I'm not sure. So much happens at the same time, An L1 read hit will cost you 4 minimum, hut all but 1 of that is hidden. can't avoid the multi cost of 3 or add 1. the decoding and uop cache hit, reservation, etc will cost a few. I have no idea.

If you know of anything describing it in such detail, I would be comopletely curiouis.

Re:The computers are fast, but you don't know it by reacharavindh on Friday June 17, 2022 @02:31AM (#31774755)
This reminds me of that “todo” I wrote for myself a long time ago. These days processors come with bigger L1,L2, and L3 caches. Would it be possible for a program that works on a tiny bit of data(few KB) to load it all up in the cache and provide ultimate response times?!

Are there any directives to the Operating System to say - “here keep this data in the fastest accessible L[1,2,3] please”?

Re:The computers are fast, but you don't know it by 2143 on Friday June 17, 2022 @06:32AM (#31776263)
> Are there any directives to the Operating System to say - “here keep this data in the fastest accessible L[1,2,3] please”?

I'm probably the worst person to explain this.

Long long ago, I took a parallel programming class in grad school.

It turns out the conventional way to do matrix multiplication results in plenty of cache misses.

However, if you carefully tweak the order of the loops and do certain minor modifications — I forget the details — you could substantially increase the cache hits and make matrix multiplication go noticeably faster on benchmarks.

Some random details that may be relevant:

* When the processor loads a single number M[x][y], it sort of loads in the adjacent numbers as well. You need to take advantage of this.

* Something about row-major/column-major array is an important detail.

What I'm trying to say is, it is possible to indirectly optimize cache hits by careful manual hand tweaking. I don't know if there's a general automagic way to do this though.

This probably wasn't very useful, but I'm just putting it out there. Maybe more knowledgeable folks can explain this better.

Re:The computers are fast, but you don't know it by matthias509 on Friday June 17, 2022 @09:03AM (#31777503)
I’m guessing you are thinking of cache lines where CPUs will read/write data in 64 byte chunks from memory to/from cache.

As you said, being aware of this lets you optimize away cache misses by controlling the memory access pattern.

Re:The computers are fast, but you don't know it by diroussel on Friday June 17, 2022 @12:35PM (#31780728)
There is a data access strategy called cache oblivious algorithms which aim to make it more likely to utilise this property without knowing the actual cache size.

I used that approach once on a batch job that read two multi megabytes files to produce a multigigabyte output file. It gave a massive speed up on at 32-bit intel machine.

https://en.wikipedia.org/wiki/Cache-oblivious_algorithm

Re:The computers are fast, but you don't know it by dragontamer on Friday June 17, 2022 @01:26PM (#31781423)
> Are there any directives to the Operating System to say - “here keep this data in the fastest accessible L[1,2,3] please”?

Not for general purpose programs, because L1 caches change so quickly each year there is no point.

For embedded real-time processors, yes. For GPUs, yes. (OpenCL __local, CUDA __shared__).

This is because Microsoft's DirectX platform guarantees 32kB or something of __shared__ / tiled memory, so all GPU providers who want a DirectX11 certification are guaranteed to have that cache-like memory that programmers can rely upon. When DirectX12 or DirectX13 comes about, the new minimum specifications are published and all graphics programmers can then take advantage of it.

-------

No sane Linux/Windows programmer however would want these kinds of guarantees for normal CPU programs, outside of very strict realtime settings (at which point, you can rely upon the hardware being constant). Linux/Windows are designed as general purpose OSes.

DirectX 9 / 10 / 11 / 12 however, is willing to tie itself to the "GPUs of the time", and includes such specifications.

Re:The computers are fast, but you don't know it by l33t2328 on Friday June 17, 2022 @02:35AM (#31774782)
I don’t think you can generally control the cache with such granularity since modern processors do all sorts of instruction level parallelism and cache coherency voodoo
Re:The computers are fast, but you don't know it by deredede on Friday June 17, 2022 @02:57AM (#31774930)
On CPUs you can't really force data to stay on the cache, but if you access it frequently and there is not too much load, it will stay there anyways.

Some architectures (e.g. GPUs) provide local "scratchpad" memories instead of (or in addition to) caches. These are separate uninitialized adressable memory region with similar access times to a L2/L1 cache.

Re:The computers are fast, but you don't know it by erwincoumans on Friday June 17, 2022 @09:44AM (#31778027)
Explicit control over the fastest memory is what GPU local storage or the PlayStation 3 Cell SPUs allow/require.

For x86_64 there are cache hints, no pinning/reserving parts of the caches (as far ad I know).

I wonder if Apple M1 or M2 cpu with unified CPU/GPU memory has anything like pinning or explicit cache control?

Re:The computers are fast, but you don't know it by jcranberry on Friday June 17, 2022 @09:45AM (#31778035)
If the data is contiguous in memory and frequently accessed it will almost certainly make its way into L1 cache and be there for the life of the program.

If the data is not contiguous it could make the CPU's life much harder.

There's also the matter of program size (the amount of instructions in the actual program) and whether the program does anything which forces it to go lower cache levels or RAM.

There are intrinsics for software prefetching such as __mm_prefetch, but those are difficult to use such that they actually increase you're performance.

Re:The computers are fast, but you don't know it by jodrellblank on Friday June 17, 2022 @10:10AM (#31778443)
One of the claimed advantages of the array programming language "K" is that the interpreter is small enough for the hot paths to stay in the CPU cache. It's hard to Google but claims come from people/places like this thread: https://news.ycombinator.com/item?id=15908394
Re:The computers are fast, but you don't know it by generalizations on Thursday June 16, 2022 @04:13PM (#31770423)
I ran across an animation once that showed graphically the time it takes light to travel between the planets and the sun. It's weird, but light doesn't seem that fast anymore.
Re:The computers are fast, but you don't know it by ineedasername on Thursday June 16, 2022 @05:28PM (#31771203)
The speed of light has really not kept pace with Moore's Law. Engineers have focused overly much on clock speed and transistor density and completely ignored C, and it's really beginning to show.
Re:The computers are fast, but you don't know it by bombcar on Thursday June 16, 2022 @07:39PM (#31772328)
People still using C as if C++ isn’t available for faster-than-light code.
Re:The computers are fast, but you don't know it by aneeshnl on Friday June 17, 2022 @01:20AM (#31774377)
Its still just 1 m/s improvement. Not worth it.
Re:The computers are fast, but you don't know it by ben_w on Friday June 17, 2022 @03:52AM (#31775312)
Only in metric units. If you’re using natural units, it’s twice as fast as c.
Re:The computers are fast, but you don't know it by gilbetron on Thursday June 16, 2022 @08:26PM (#31772649)
dammit that took me a second to get
Re:The computers are fast, but you don't know it by orzig on Thursday June 16, 2022 @05:56PM (#31771485)
Another consequence of our society’s reduced investment in fundamental physics - instead we go ether.
Re:The computers are fast, but you don't know it by AnimalMuppet on Thursday June 16, 2022 @06:08PM (#31771615)
I recently read a science fiction short story on reddit, where humans had developed faster-than-light communication because they needed to reduce lag in networked games.
Re:The computers are fast, but you don't know it by scarmig on Thursday June 16, 2022 @06:09PM (#31771623)
Perhaps the solution is more on the bioengineering side of things: make smaller people so they can fit in smaller rooms.
Re:The computers are fast, but you don't know it by Scalene2 on Friday June 17, 2022 @02:15AM (#31774646)
So, there's actually a proposal for "real-time" communication between galaxies. Just upload your consciousness to a computer and run it slow enough that a few hundred million years feels like a couple seconds.
Re:The computers are fast, but you don't know it by gpderetta on Friday June 17, 2022 @03:49AM (#31775285)
Slow time is a thing on a few Egan books were the population (of effectively immortal post humans) of some planets collectively decide to slow their internal clocks to allow some of their members to take interstellar trips without missing out too much of their original life.

The trips themselves of course consist on transmitting the mind to be downloaded on a new body on the other side.

Re:The computers are fast, but you don't know it by RaoulP on Friday June 17, 2022 @03:52AM (#31775309)
I don’t really see the benefit. But running that slow, you might experience the heat death of the universe in your lifetime!
Re:The computers are fast, but you don't know it by inkblotuniverse on Friday June 17, 2022 @06:10AM (#31776140)
The idea is that you've already dismantled the stars and stockpiled all the energy in the universe, to use at your leisure. (i.e. everyone lives around black holes they can throw mass into to reap the bawking radiation). Since you have control over the last non-entropic systems, you can tune how fast the candle burns.

And you're a mind running on a computer! You were already going to experience the heat death! This is just a scheme to get the most subjective time out of it as possible. (Running slower is more efficient.)

Re:The computers are fast, but you don't know it by _dain_ on Thursday June 16, 2022 @08:58PM (#31772871)
Bay Area, 1960s: "Soon we will have computers the size of a single room"

Bay Area, 2020s: "Soon we will have rooms the size of a single computer"

Re:The computers are fast, but you don't know it by ben_w on Friday June 17, 2022 @03:58AM (#31775351)
"Vertical sleep pod, extra large (room for iPad on ceiling!), $3500/month"
Re:The computers are fast, but you don't know it by ruined on Friday June 17, 2022 @01:59AM (#31774569)
this has been tried before. the vast majority of the smaller people that get made simply keep getting bigger until they become normal size.
Re:The computers are fast, but you don't know it by necovek on Friday June 17, 2022 @05:19AM (#31775853)
We need to make them make even smaller people before they grow (up? :)!
Re:The computers are fast, but you don't know it by ineedasername on Thursday June 16, 2022 @07:44PM (#31772347)
That would have a nice side benefit or making space exploration much more economical. Faster too if you can bioengineer higher G resistance at the same time. Maybe someday the outer planets will be colonized by tiny humans measured in millimeters, with 125mm humans darting around the various moons shot out of repurposed tank canons, all laughing at the slow giants stuck down the gravity well on Earth.
Re:The computers are fast, but you don't know it by hermitcrab on Friday June 17, 2022 @03:11AM (#31775029)
Their tiny brains might be an issue for space exploration. But ideal for setting up a government when they arrive.
Re:The computers are fast, but you don't know it by taneq on Friday June 17, 2022 @05:34AM (#31775954)
Or just normal sized humans simulated on a supercomputer the size of a matchbox…
Re:The computers are fast, but you don't know it by fendy3002 on Thursday June 16, 2022 @09:11PM (#31772946)
Then how will tinder be? "If you're less than 10 cm don't talk to me midget".

OTOH can the heart perform equally good if human get miniaturized?

Re:The computers are fast, but you don't know it by Scalene2 on Friday June 17, 2022 @02:17AM (#31774657)
This is one reason an all female astronaut team has been considered.
Re:The computers are fast, but you don't know it by somenameforme on Friday June 17, 2022 @02:12AM (#31774627)
The much more remarkable thing is to consider that that speed of light is also the speed of causality itself. It takes light from the sun about 8 minutes to reach Earth. If the sun suddenly disappeared, we'd still see it shining brightly in the sky, and the Earth would continue revolving around it - all for another 8 minutes until reality finally caught up to us. So we're already computing at a rate on the verge of the speed of reality itself.

It's interesting to consider this paired against how technologically primitive we ostensibly must be, given that digital computers didn't even exist 90 years ago.

Re:The computers are fast, but you don't know it by CMCDragonkai on Friday June 17, 2022 @02:21AM (#31774689)
Is the speed of light really the speed of causality? Would the effect of gravity (the lack of) affect Earth earlier than us perceiving the lack of light.
Re:The computers are fast, but you don't know it by d110af5ccf on Friday June 17, 2022 @02:26AM (#31774722)
Nope. All physical effects are bounded by the speed of light. (As far as anyone knows, anyway.)

The only weird one is quantum entanglement, but even then information transfer doesn't travel faster than light and that's about all I know on that subject.

Re:The computers are fast, but you don't know it by rl3 on Friday June 17, 2022 @02:41AM (#31774817)
>The only weird one is quantum entanglement, but even then information transfer doesn't travel faster than light ...

For anyone wondering why that is, I found this explanation super interesting:

https://www.forbes.com/sites/startswithabang/2020/01/02/no-w...

Re:The computers are fast, but you don't know it by drewtato on Friday June 17, 2022 @03:51AM (#31775303)
I also liked this explanation: https://www.youtube.com/watch?v=v7jctqKsUMA

In short, the only information you gain is about the outcome of the other side's measurement. They cannot introduce information into the particle, and thus can't transmit information. The only thing you learn is what you already knew: the other particle had a 50% chance of being in one state or another, with the added fact that it's now correlated to your particle with a 75% (depending on experiment) chance. This is information that didn't exist until that moment, so it couldn't have been sent out and reach you before you measure your particle, which would inform you with 75% certainty how your particle would act and break causality.

Re:The computers are fast, but you don't know it by dorgo on Friday June 17, 2022 @01:13PM (#31781235)
> All physical effects are bounded by the speed of light.

The universe expands faster than light. So this expansion is not a physical effect?

Re:The computers are fast, but you don't know it by orestarod on Monday June 20, 2022 @07:23AM (#31808965)
The universe expanding is a property of space itself. And "faster than light" is only because miniscule space expansion in any quantum of space adds up with distance, e.g. 1 picometer per kilometer per second, add enough trillions of kilometers and you get that faster than light expansion. There is no mass, particle or information moving THROUGH space faster than the speed of light, which is what the said limit concerns.
Re:The computers are fast, but you don't know it by saberience on Friday June 17, 2022 @04:42AM (#31775609)
Why does gravity travel at the speed of light?
Re:The computers are fast, but you don't know it by rieTohgh6 on Friday June 17, 2022 @05:57AM (#31776074)
Well the other way to look at it is: gravity travels at maximum possible speed in this universe. Light in vacuum can also reach same maximum speed. I guess we would say the light travels with speed of gravity if we measured them in other order.
Re:The computers are fast, but you don't know it by e63f67dd-065b on Friday June 17, 2022 @02:26AM (#31774724)
The speed of light is the speed of information propagation. Information about the sun disappearing would only reach earth at after c/1AU.
Re:The computers are fast, but you don't know it by HWR_14 on Friday June 17, 2022 @02:39AM (#31774804)
The change in gravitational force also propagates at the speed of light. It's weird.
Re:The computers are fast, but you don't know it by edbaskerville on Thursday June 16, 2022 @04:19PM (#31770491)
The thing that did for me is realizing that people on opposite sides of the United States can't play music together if it requires any rhythmic coordination, even with a true speed-of-light signal with no other sources of latency.
Re:The computers are fast, but you don't know it by aeonik on Thursday June 16, 2022 @05:32PM (#31771241)
jamtaba and ninjam are an open source solutions to this problem.

They allow you to buffer everyone's playing, at a user specified interval, then replays the last measure of music to everyone.

It's definitely not the same as live playing, but it's still pretty fun, and actually forces you to get creative on different ways.

https://jamtaba-music-web-site.appspot.com/

Re:The computers are fast, but you don't know it by edbaskerville on Friday June 17, 2022 @12:17PM (#31780424)
Interesting! Presumably last 12 measures if you're playing a 12-bar blues, etc.

Big downside is you're stuck playing to a metronome, which would be enough for me to skip it, but it depends on the kind of music you're playing.

I could imagine that if the music is rhythmically slow and vague and improvised, big latencies are OK, and actually might yield some pretty interesting creative results.

Another model I've thought about is to structure players in a rooted DAG, and players can hear only people upstream of them.

E.g., you could build an orchestra by having a conductor and section leaders in a room together (or at within very low latency of each other). Other players could hear the leaders and play along, and then an audience could hear everyone. You could also do something more complicated like build things out in linear or power-of-2 layers, where each layer can hear everything upstream of it, and therefore many players would get a partial sense of the orchestral effect.

This could work nicely for improvised music, too, with causality preserved.

Re:The computers are fast, but you don't know it by Aeolun on Friday June 17, 2022 @01:35AM (#31774446)
How does that work for the one playing ahead of everyone else? He just doesn’t hear anything? Or he hears his own music from 1 second ago? Or worse, other people’s music from 1 second ago.
Re:The computers are fast, but you don't know it by rocqua on Friday June 17, 2022 @02:12AM (#31774623)
I think everyone hears everyone else playing x milliseconds ago? Where x is probably decided based on the beat.

The weird side-effects are why I guess the parent said that "it's still pretty fun, and actually forces you to get creative on different ways."

Re:The computers are fast, but you don't know it by dizhn on Friday June 17, 2022 @08:56AM (#31777406)
You have to think in bars not seconds.I believe you hear your own playing in near real time and is overlayed on the bars coming from others.

It works pretty well with well structured music like the blues. You probably couldn't play well if the piece was changing tempo or key all the time.

Re:The computers are fast, but you don't know it by sklopi on Friday June 17, 2022 @02:31AM (#31774757)
You could have a metronome in the middle
Re:The computers are fast, but you don't know it by ZoomZoomZoom on Friday June 17, 2022 @05:15AM (#31775833)
It is actually the way to go with client-server programs, such as Jamulus. People from distant locations try to chose/run a server closer to their geographical (or, more properly, with a correction on how the fiber runs) middlepoint.
Re:The computers are fast, but you don't know it by shultays on Thursday June 16, 2022 @05:47PM (#31771394)
I feel like it is more like we cant comprehend how big and empty space is
Re:The computers are fast, but you don't know it by booleandilemma on Saturday June 18, 2022 @10:34AM (#31790130)
I saw that exact animation you're talking about and my first thought was "there's no way that's the fastest thing in the universe."
Re:The computers are fast, but you don't know it by generalizations on Friday June 17, 2022 @05:57PM (#31784925)
Re:The computers are fast, but you don't know it by capableweb on Friday June 17, 2022 @03:07AM (#31774990)
If you're using a normal monitor, the bottleneck would be transferring the results of the calculation to the monitor, which commonly have a latency of 3ms or more. So when the monitor displays the calculations, the CPU has already moved on to other things :)
Re:The computers are fast, but you don't know it by drewtato on Friday June 17, 2022 @03:26AM (#31775138)
It takes 10-20ms for the pixels to transition on an LCD display. And on 60Hz, it's 8+/-8ms for the monitor to actually address the row with your information. Luckily, the CPU doesn't need to wait for the monitor. And the slowest part of the chain will almost always be getting it from your eyes to your hands (250ms+).
Re:The computers are fast, but you don't know it by diroussel on Thursday June 16, 2022 @03:52PM (#31770152)
That is quite an amazing way to put it.

So the processor in my hand can compute a multiplication fast than light can cross the room?

Re:The computers are fast, but you don't know it by jiggawatts on Thursday June 16, 2022 @06:31PM (#31771813)
It can complete many multiplications in that time, especially if you factor in parallelism. An 8-core machine using AVX-512 could do a few thousand 32-bit multiplications in that time. Your GPU can do tens of thousands, maybe hundreds of thousands depending on the model.
Re:The computers are fast, but you don't know it by bombcar on Thursday June 16, 2022 @07:41PM (#31772335)
Or another way to look at it - the computer can do an absolute insane amount of math in the time it takes to roundtrip a single byte to the datacenter in US-West.
Re:The computers are fast, but you don't know it by jiggawatts on Thursday June 16, 2022 @07:58PM (#31772446)
The more generic way I like to put it is that throughput has been improving exponentially for decades thanks to Moore's law, but latency hasn't changed much at all and has a hard limit due to the speed of light.

Hence the ratio between latency and compute has been changing exponentially. Even a linear or quadratic change would be dramatic, but exponential is something people just can't wrap their heads around. They're unable to really internalise it, in much the same way that in the early days of COVID people couldn't quite fathom how it is possible to go from 3-5 cases per day to tens of thousands.

HDD random I/O latencies are about 10 to 100x slower than a network hope. These days local SSD latencies are about 100x better than a typical network hop and this is just going to keep going. It'll soon be 1,000x better, then 10,000x, etc...

Any architecture using "remote storage" or "remote database calls" will be absolutely hamstrung by this. It'll be the equivalent of throwing away 99.99% or even 99.999% of the available performance.

People will eventually wise up to this and start switching over to distributed databases that run in the same VM/container as the application tier. So instead of "N" web servers talking to "M" database servers, it'll be N+M nodes with both components deployed into them.

Whatever argument can be made against this new architecture will become exponentially invalidated over time. Putting everything together is "too many GB of software to deploy"? Bzzt... we'll have 1 TB ram soon in typical servers. The CPU load of both together is too high? Bzzt.. the next EPYC CPUs will likely have 128 cores! Cache thrashing a problem? Bzzt... 1 GB and larger L3/L4 CPU caches are just around the corner.

Re:The computers are fast, but you don't know it by mellavora on Friday June 17, 2022 @06:17AM (#31776177)
> slower than a network hope.

Sometimes typos contain wisdom

Re:The computers are fast, but you don't know it by Aeolun on Friday June 17, 2022 @01:37AM (#31774454)
Millions of multiplications in the time it takes me to open the ‘calc’ app.
Re:The computers are fast, but you don't know it by jiggawatts on Friday June 17, 2022 @06:50AM (#31776378)
Billions.

Your estimate is off by 3 orders of magnitude.

Re:The computers are fast, but you don't know it by Aeolun on Friday June 17, 2022 @09:08AM (#31777556)
You underestimate the speed at which I open the app ;)
Re:The computers are fast, but you don't know it by wruza on Friday June 17, 2022 @06:44AM (#31776340)
Not so extraordinary if you take into account that CPU is essentially a thumb-sized labyrinth for light.
Re:The computers are fast, but you don't know it by orestarod on Monday June 20, 2022 @07:28AM (#31809017)
Not light. It's electric potential that moves around. No visible photons involved.
Re:The computers are fast, but you don't know it by dekhn on Thursday June 16, 2022 @04:50PM (#31770808)
Eventually you can't stuff enough computing in a small area (power density). Therefore you have to connect multiple CPUs spread out in space. The limit for many supercomputers is about how long it takes light or electrical signals to travel about 20 meters. Latency to first result is only part of the measurement that matters.
Re:The computers are fast, but you don't know it by denzil on Friday June 17, 2022 @04:34AM (#31775561)
This comparison reminds me of Grace Hopper explaining how long nanosecond is: https://www.youtube.com/watch?v=9eyFDBPk4Yw
Re:The computers are fast, but you don't know it by grishka on Thursday June 16, 2022 @04:06PM (#31770329)
Huh, but then I'm pretty sure that there are some paths inside the CPU die that are long enough that speed of light is a consideration at these frequencies. Must require a lot of smart people to design these things, yet it only takes a bunch of junior developers to bog them down.
Re:The computers are fast, but you don't know it by orestarod on Monday June 20, 2022 @07:33AM (#31809049)
There is indeed the speed of propagation of electric potential taken into account, that is, how long it takes for the input of a logical gate or a logical subsystem to produce the output (that involves the propagation of electric potential through the chip's conductors). If your clock is too fast for the size of your subsystem, the result will not be correct at the output before the next cycle begins, so your system will just be bogus.
Re:The computers are fast, but you don't know it by google234123 on Thursday June 16, 2022 @04:14PM (#31770431)
I say we ban all junior devs.
Re:The computers are fast, but you don't know it by morelisp on Thursday June 16, 2022 @04:19PM (#31770493)
Easier to raise the speed of light.
Re:The computers are fast, but you don't know it by salawat on Thursday June 16, 2022 @06:29PM (#31771786)
And risk the universal UB?

No thanks.