News for hackers. Stuff that matters.
Re:Computers are fast by kia on Tuesday October 12, 2010 @02:35PM (#1784377)
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...

Re:Computers are fast by billybob on Tuesday October 12, 2010 @02:48PM (#1784426)
I'm not sure if you're being sarcastic or not, but I'm on the same page. I try to focus on clarity and elegance in my code, and only worry about speed if it turns out to be slow.

But I sure as heck grumble when my computer is slow. "You've got, like, 800 hojillion cycles a second!" I say to it. "How hard is opening a program?!"

Is that hypocritical?

Re:Computers are fast by kia on Tuesday October 12, 2010 @03:01PM (#1784481)
On the first launch VS is slower.

Disclaimer: I am using custom gnu/linux built entirely form sources.

Re:Computers are fast by barrkel on Tuesday October 12, 2010 @02:48PM (#1784428)
I blame I/O. It's pretty fast warmed up.
Re:Computers are fast by dagw on Tuesday October 12, 2010 @05:14PM (#1785004)
That seems to be the lesson. Don't worry about a few thousands flops here or there, put your focus on minimizing IO.
Re:Computers are fast by Symbol on Tuesday October 12, 2010 @03:06PM (#1784499)
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?
Re:Computers are fast by frou_dh on Tuesday October 12, 2010 @03:32PM (#1784580)
Did you see that article on the Varnish site about second-guessing Virtual Memory? "2006 programmng" I think it was.
Re:Computers are fast by jholman on Tuesday October 12, 2010 @05:13PM (#1784998)
obligatory HN links:

Varnish dev says second-guessing VM is so 1975: http://news.ycombinator.com/item?id=1554656 OR http://news.ycombinator.com/item?id=1760811

Redis dev says second-guessing VM is elite (and not doing so is so 2006): http://news.ycombinator.com/item?id=1760540

Re:Computers are fast by potatolicious on Tuesday October 12, 2010 @04:07PM (#1784719)
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.

Re:Computers are fast by senki on Tuesday October 12, 2010 @04:23PM (#1784791)
Good idea. They already do it.
Re:Computers are fast by TeHCrAzY on Tuesday October 12, 2010 @06:40PM (#1785274)
Specifically: SuperFetch, first seen in Vista: http://en.wikipedia.org/wiki/Windows_Vista_I/O_technologies#...
Re:Computers are fast by silentbicycle on Tuesday October 12, 2010 @07:57PM (#1785485)
Or Unix's mmap, which predates Vista by a couple decades. (It was designed around the time of 4.2BSD, i.e., 1983* .) I'd be shocked if Windows hasn't had a similar mechanism for years, as well.

* _The Design and Implementation of the 4.4BSD Operating System_, McKusick et al., p. 29-30.

Re:Computers are fast by barrkel on Wednesday October 13, 2010 @07:42AM (#1786785)
mmap is not SuperFetch; and memory mapping has been in NT since it started.

What SuperFetch does is collect statistics about files hit by processes when they start up, so it can proactively cache bits of those files, to the point that it can cache files read by processes before those processes are ever started, assuming they are either commonly started or started on a schedule.

Re:Computers are fast by mistermann on Wednesday October 13, 2010 @12:46AM (#1786123)
That's very weird. I can launch VS 2010 in < 3 seconds cold on my system. Maybe its a VM thing? VS might always think its launching for the very first time ever on that machine, so it has a lot of heavy duty, one time only things, but on a VM, it does this every time you boot the VM?
Re:Computers are fast by dagw on Wednesday October 13, 2010 @08:06AM (#1786826)
I just timed it as well. VS c++ 2008 Express on my super old and slow P4, 5 seconds. And this is the first time I started VS in weeks.