Live data from Hacker News

Computers are fast

blog.hackensplat.com

11–20 of 54 posts

Re: Computers are fast

#11
Something I like thinking about: Your computer can (probably) perform a few dozen arithmetic operations or a few stores/reads in the time light leaving your monitor takes to reach your eye balls.

edit: not to mention GPUs

Re: Computers are fast

#12
1993: if

1998: "if" too slow; use "case".

2002: "case" too slow; use Boolean algebra.

2006: Boolean algebra too slow, use arrays & pointers.

2010: Who wrote this shit and what does it do? Rewritten to use "if".

Re: Computers are fast

#13
CPUs are fast but the ratio of latency of random access vs. maximum bandwidth is getting worse.

In nanoseconds, approximately:

  10^7 Disk seek
  10^4 2KB over 1Gbps
  10^2 RAM uncached reference
  10^1 L2/L3 cache reference
  10^0 L1 cache reference
That's why systems don't feel fast lately. In particular for big data or bloated software that can't fit well within the caches or shared systems doing a lot of frequent switches (VMs in particular.)

Many classic assumptions for algorithms are outdated. Like avoiding full sequential scans. Those are fast for simple operations.

Re: Computers are fast

#14
post #10
post #6

Earlier quoted context omitted.

I blame I/O. It's pretty fast warmed up.

I/O is one of my biggest daily pains. Spend some time in Process Explorer on Windows and you can see just how much disk-based I/O the average app is doing. Anti-virus software makes the bad problem worse. It's just like pouring sugar in a gastank. Why isn't more software designed to take advantage, where appropriate, of large amounts of RAM?

Did you see that article on the Varnish site about second-guessing Virtual Memory? "2006 programmng" I think it was.

Re: Computers are fast

#16
I loved the punchline to the story. Someone decides to write an algorithm to compute a few tables, works a while on an algorithm to compute them efficiently, in the end gives up and brute-forces it very inefficiently, then discovers that it takes only 2 seconds to run.

And the punchline: there's an article on Wikipedia with all of the values pre-computed!

Re: Computers are fast

#17
post #11

Something I like thinking about: Your computer can (probably) perform a few dozen arithmetic operations or a few stores/reads in the time light leaving your monitor takes to reach your eye balls. edit: not to mention GPUs

I wasted most of the early 90s doing that.

We need 64 transputers to run this in real time, 1 year of PCB layout later = hey we can do this in 16 transputers and a Sparc.

Cue another year of redesign - now it would only take 4 transputers and a Sparc5.

Then a sales guy turns up promising to put the 16 transputers into an FPGA card.

Just before that works we get an i860 board for the Sparc.

Then finally we can do it in software on a Pentium...

Re: Computers are fast

#18
post #11

Something I like thinking about: Your computer can (probably) perform a few dozen arithmetic operations or a few stores/reads in the time light leaving your monitor takes to reach your eye balls. edit: not to mention GPUs

I just had to do arithmetic. A 3 GHz processor would clock about 10.006671 cycles in the time it takes for light to travel 1 meter.

Re: Computers are fast

#19
post #6
post #4

Yes. Computers are fast. Who cares about algorithms... Premature optimization is evil... But why then it is so annoying that Visual Studio starts longer than my whole custom linux system in VM on the same computer...

I blame I/O. It's pretty fast warmed up.

Sometimes I wonder if the OS can put very heavily used files from the FS into RAM. Some software just sucks and keeps pulling the same files over and over...

... and the plus side is, if an application needs the RAM, no harm done, just dump the file from RAM and read it from disk.

Post reply on HN