Slashdot Mirror


Can "Page's Law" Be Broken?

theodp writes "Speaking at the Google I/O Developer Conference, Sergey Brin described Google's efforts to defeat "Page's Law," the tendency of software to get twice as slow every 18 months. 'Fortunately, the hardware folks offset that,' Brin joked. 'We would like to break Page's Law and have our software become increasingly fast on the same hardware.' Page, of course, refers to Google co-founder Larry Page, last seen delivering a nice from-the-heart commencement address at Michigan that's worth a watch (or read)."

29 of 255 comments (clear)

  1. Of Course by eldavojohn · · Score: 5, Insightful

    Can "Page's Law" Be Broken?

    I think it gets broken all the time. At least in my world. Look at Firefox 3 vs 2. Seems to be a marked improvement in speed to me.

    And as far as web application containers go, most of them seem to get faster and better at serving up pages. No, they may not be "twice as fast on twice as fast hardware" but I don't think they are twice as slow every three months.

    I'm certain it happens all the time, you just don't notice that ancient products like VI, Emacs, Lisp interpreters, etc stay pretty damn nimble as hardware takes off into the next century. People just can't notice an increase in speed when you're waiting on I/O like the user.

    --
    My work here is dung.
    1. Re:Of Course by falcon5768 · · Score: 3, Informative

      agreed. Apple always manages to break it too with OS X. from 10.1 to 10.4 the OS notably improved in speed on even older equipment each time it upgraded, even on older PPC G3 and G4 machines.

      --

      "Slashdot, where telling the truth is overrated but lying is insightful."

    2. Re:Of Course by Z00L00K · · Score: 4, Insightful

      The law isn't linear, it's more sawtooth-style.

      Features are added all the time which bogs down the software, and then there is an effort to speed it up and then there are features added again.

      One catch in performance is that it sure is faster to use RAM for data, but there is also a lot of useless data floating around in RAM, which is a waste of resources.

      And this is often the curse of object-oriented programming. Objects carries more data than necessary for many of the uses of the object. Only a few cases exists where all the object data is used. A lot of object-oriented programming is somewhat like using 18-wheelers for grocery shopping.

      This often explains why old languages like C, Cobol etc. are able to do the same thing as a program written in C++, Java or C# at the fraction of the resource cost and at much greater speed. The disadvantage is that the old languages require more skills from the programmer to avoid the classical problems of deadlocks and race conditions as well as having to implement functionality for linked lists etc.

      --
      If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
    3. Re:Of Course by Carewolf · · Score: 3, Interesting

      Exactly firefox 3 vs 2 is an excelent example. Especially because Firefox between major releases have been know for the opposite: Getting slower with each minor release.

      There are also examples of the opposite. The KDE 3.x got faster and faster for the entire generation, while KDE 4.0 was much slower again, but here 4.1, 4.2 and especially the next 4.3 is many times fast than the 4.0 release.

      So I don't think Google's ideas are unique. The issue is well known and fought against in many different ways in especially open source.

    4. Re:Of Course by Anonymice · · Score: 5, Funny

      I can't speak to emacs...

      RTFM.
      C-x M-c M-speak

    5. Re:Of Course by AmiMoJo · · Score: 5, Insightful

      OO was never designed for speed or efficiency, only ease of modelling business systems. It became a fashionable buzz-word and suddenly everyone wanted to use it for everything, so you end up in a situation where a lot of OO programs really only use OO for allocating memory for new objects.

      I'm not trying to be a troll here, I just find it odd that OO is considered the be-all and end-all of programming to the point where people write horribly inefficient code just because they want to use it. OO has it's place, and it does what it was designed to do quite well, but people should not shy away from writing quality non-OO code. I think a lot of programmings come up knowing nothing but OO these days, which is a bit scary...

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    6. Re:Of Course by hedwards · · Score: 3, Interesting

      That's definitely a large part of the problem, but probably the bigger problem is just the operating assumption that we can add more features just because tomorrows hardware will handle it. In most cases I would rather have the ability to add a plug in or extension for things which are less commonly done with an application than have everything tossed in by default.

      Why this is news is beyond me, I seem to remember people complaining about MS doing that sort of thing years ago. Just because the hardware can handle it doesn't mean that it should, tasks should be taking less time as new advancements are going, adding complexity is only reasonable when it does a better job.

    7. Re:Of Course by drsmithy · · Score: 5, Funny

      agreed. Apple always manages to break it too with OS X. from 10.1 to 10.4 the OS notably improved in speed on even older equipment each time it upgraded, even on older PPC G3 and G4 machines.

      Of course, when you're starting from a point of such incredibly bad performance, there's not really anywhere to go but up.

      It would have been more impressive if they'd somehow managed to make it slower with each release.

    8. Re:Of Course by Jeremy+Erwin · · Score: 3, Interesting

      Let me give you an example. 10.2 introduced Quartz Extreme, which offloaded certain 2D graphics operations from the CPU onto the graphics card. If you had a graphics card capable of supporting non-powers-of-two textures, it was snappy.

      OSX 10.3 introduced Expose, a method of manipulating windows that leveraged Quartz Extreme. Flashy, but it also made skilled users more productive. It is dog slow on any mac with non-QE graphics card. It imposed a somewhat minimal load on any modern mac. 10.3 feels faster than 10.2, even though there's more going on in the background.

      As for memory, memory's cheap. I recall someone defining supercomputing as "buying processing power with increased memory usage..."

    9. Re:Of Course by grumbel · · Score: 4, Interesting

      Well, that depends, OOP alone is certainly not the guilty one for causing all the slowdown, but abstraction in general is guilty for a lot of things. Todays software is just way to removed from the actual hardware to allow certain kinds of optimizations. Random example: When you have a 2D game on older hardware (say GBA or similar) you could scroll by manipulating two bytes that represent the scroll offset, everything else was done in hardware. How do you scroll in a 2D game today? Fullscreen refreshes, as you don't have any access to the hardware to allow faster ways to scroll. So in the worst case you have to manipulate not 2 bytes, but around six million of them. Thats quite a few orders of magnitude difference there, that you can't really optimize away today.

      Now for real games of course you might have a GPU that can handle that amount of speed and since modern games are 3D you don't really have a choice of not doing fullscreen refreshes to begin with, but as soon as you look into web games you can see all the problems, games in Flash or Javascript most of the time run completly terrible, worse then games you might have played a decade or two ago, because those games don't even have GPU access but instead pump their data through layers upon layers of abstraction before they finally hit the graphics card.

      In the end I think the core problem is simply that todays software is written far to often for an abstract black box, instead of for a actual hardware. Especially web development is just way to removed from the actual machine to even have a chance of running quickly. To make things really fast you would have to optimize all layers of abstractions that the code has to run through, but most often you just don't have the control over it, as development is far more spread out these days. Its no longer your code and the hardware, its your code, dozens or even hundreds of libraries and then maybe far far away some piece of hardware again.

    10. Re:Of Course by NewbieProgrammerMan · · Score: 3, Interesting

      I would like to see your fancy C++ with templates stuff compile onto some of the proprietary toolkits I have seen for small ARM and gate array systems. Writing code that uses a number of fixed sized simple data structures all written in C makes it very easy to port it to embedded systems. The moment you use something that seems as innocuous as C++ exceptions...

      This was not (and never was going to be) an application for an embedded or real-time system. I'm not sure what I said that left everyone with the impression that I'm bashing real-time or embedded development practices. I know (more now than I did before) that there are reasons for doing such things in those environments, but none of those applied in this situation.

      My point wasn't that they should switch to C++ or something else. Personally, I don't like fancy C++ template stuff; I'd rather just stick with ANSI C. What I was trying (but apparently failing) to do was make the point that needless memory bloat isn't some curse that only applies to OO development, as was suggested in the post I initially replied to.

      --
      [b.belong('us') for b in bases if b.owner() == 'you']
    11. Re:Of Course by billcopc · · Score: 3, Interesting

      That's still about 100 times more memory than is required to edit a text file. How do you think people got by in the 286 days when 640 Kb was standard ? Does vim allocate ridiculously oversized buffers just to show a blank screen ?

      I don't mean to pick on vim specifically, all software is guilty of this pointless bloat. Instead of having tiny apps that load and run at lightning speed, we continue to build these sloppy behemoths that can't accomplish the simplest things without triggering a dozen page faults and diddling some redundant spinlocks. It's fine to add media to make things esthetically pleasing, but code bloat benefits no one.

      With today's hardware and its ludicrous speed, we should be adding intentional delays to our code, because it should be running so damned fast that usability would suffer. The user should be the bottleneck, not the software. We have machines that are literally a thousand times faster than that heavy old 286, yet the load times for today's software are longer than booting Wordperfect 5.1 from a 360k floppy.

      --
      -Billco, Fnarg.com
    12. Re:Of Course by NewbieProgrammerMan · · Score: 3, Insightful

      Thanks for trying, ion.simon.c. I didn't know it was this big of a sin to accidentally offend realtime developers on Slashdot.

      --
      [b.belong('us') for b in bases if b.owner() == 'you']
  2. Most bang for the buck. by rotide · · Score: 5, Insightful
    Why would a company spend money to make software more efficient when the current incarnation does its job just fine?

    While I like the idea of being as succinct and efficient as possible with your code, at what point does it become fruitless?

    Obviously, if you're testing your code on a "new" workstation and it's sluggish, you'll find ways to make it work better. But if it works well? What boss is going to pay you to work on a project for no real benefit other than to point out it is very efficient?

    1. Re:Most bang for the buck. by cylcyl · · Score: 4, Interesting

      When companies go into feature race, they forget that it quickly becomes diminishing returns. As the features you enable are less and less likely for your client base to be interested in.

      However, if you improve the performance of your core functions (thru UI or speed), your entire customer base gets improvement and have a real reason to upgrade

  3. Nope by Colin+Smith · · Score: 4, Funny

    You just get an app which uses 100k of RAM and 32gb of filesystem buffer.

     

    --
    Deleted
  4. Re:I don't think that holds up by Keith_Beef · · Score: 5, Informative

    All he has done is put numbers into Wirth's law.

    I remembered this as "software gets slower faster than hardware gets faster", but Wikipedia has a slightly different wording: "software is getting slower more rapidly than hardware becomes faster".

    http://en.wikipedia.org/wiki/Wirth%27s_law

    In fact, that article also cites a version called "Gates's Law", including the 50% reduction in speed every 18 months.

    K.

  5. They probably will. by fuzzyfuzzyfungus · · Score: 5, Insightful

    I'd suspect that Google probably will. Not because of any OMG special Google Genius(tm), but because of simple economics.

    Google's apps are largely web based. They run on Google's servers and communicate through Google's pipes. Since Google pays for every server side cycle, and every byte sent back and forth, they have an obvious incentive to economize. Since Google runs homogenous services on a vast scale, even tiny economies end up being worth a lot of money.

    Compare this to the usual client application model: Even if the scale is equivalent, the maker of the software doesn't pay for the computational resources. Their only pressure is indirect(i.e. customers who don't buy because their machines don't meet spec, or customers who get pissed off because performance sucks). They thus have a far smaller incentive to watch their resource consumption.

    The client side might still be subject to bloat, since Google doesn't pay for those cycles; but I suspect competitive pressure, and the uneven javascript landscape, will have an effect here as well. If you are trying to sell the virtues of webapps, your apps are (despite the latency inherent in web communication) going to have to exhibit adequate responsiveness under suboptimal conditions(i.e. IE 6, cellphones, cellphones running IE 6), which provides the built in "develop for resource constrained systems" pressure.

  6. Re:The 'easy' way by imgod2u · · Score: 4, Insightful

    The problem there is that there gets to a point where the user just won't notice "stellar" speeds. Take a video game for instance. Anything past ~70 fps is really unnoticeable by the average human eye. If you design the game to run at 70 fps for a slow and memory constrained machine, the user won't really notice his quad-SLI or whatever vacuum cleaner box being any better. And you've sacrificed a lot in visual quality.

  7. Re:The 'easy' way by Abcd1234 · · Score: 4, Informative

    Make developers target a slow and memory constrained platform. Then you get stellar performance when it runs on the big machines.

    Hardly. Have you never heard of space-time tradeoffs? ie, the most common compromise one has to make when selecting an algorithm for solving a problem? If you assume you have a highly constrained system, then you'll select an algorithm which will work within those constraints. That probably means selecting for space over time. Conversely, if you know you're working on a machine with multiple gigabytes of memory, you'll do the exact opposite.

    In short: there's *nothing wrong with using resources at your disposal*. If your machine has lots of memory, and you can get better performance by building a large, in-memory cache, then by all means, do it! This is *not* the same as "bloat". It's selecting the right algorithm given your target execution environment.

  8. Grosch's (other) Law by Anonymous Coward · · Score: 4, Informative

    Herb Grosch said it in the 1960's: Anything the hardware boys come up with, the software boys will piss away.

  9. Adding RAM to an existing device by tepples · · Score: 5, Insightful

    RAM is cheap these days.

    Unless you would need to add RAM to millions of deployed devices. For example, the Nintendo DS has 4 MB of RAM and less than 1 MB of VRAM, and it broke 100 million in the first quarter of 2009. Only one DS game came with a RAM expansion card.

  10. Benefits of being able to render over 100 fps by tepples · · Score: 3, Informative

    Anything past ~70 fps is really unnoticeable by the average human eye.

    I disagree. If you can render the average scene at 300 fps, you can:

    • Apply motion blurring (think 4x temporal FSAA) at 60 fps. Film gets away with 24 fps precisely because of motion blur.
    • Keep a solid 60 fps even through pathologically complex scenes.
    • Render at 60 fps even when four players have joined in on the same home theater PC.

    If you design the game to run at 70 fps for a slow and memory constrained machine [...] you've sacrificed a lot in visual quality.

    A well-engineered game will have (or be able to generate) meshes and textures at high and low detail for close-up and distant objects respectively. On high-spec PCs, you can use the high-detail assets farther from the camera; on the slow and memory-constrained PCs that your potential customers already own, they get the low-detail assets but can still enjoy the game.

    1. Re:Benefits of being able to render over 100 fps by imgod2u · · Score: 3, Insightful

      I disagree. If you can render the average scene at 300 fps, you can:

              * Apply motion blurring (think 4x temporal FSAA) at 60 fps. Film gets away with 24 fps precisely because of motion blur.
              * Keep a solid 60 fps even through pathologically complex scenes.
              * Render at 60 fps even when four players have joined in on the same home theater PC.

      All of your points follows the argument "you can do 60 fps with higher quality". Which was pretty much my argument...

      A well-engineered game will have (or be able to generate) meshes and textures at high and low detail for close-up and distant objects respectively. On high-spec PCs, you can use the high-detail assets farther from the camera; on the slow and memory-constrained PCs that your potential customers already own, they get the low-detail assets but can still enjoy the game.

      It could or it could not. The point is the game can utilize the computing power of higher-end systems. It isn't just designed for a slow and memory-constrained machine and then runs at blazing fps on faster systems; you can change visual quality settings to use more computing power.

    2. Re:Benefits of being able to render over 100 fps by Shin-LaC · · Score: 3, Informative

      Mod parent up. And here is a page that explains some common misconceptions.

  11. Re:Page's Law. by mdmkolbe · · Score: 4, Insightful

    Do you remember Moore because of his law or because he co-founded Intel?

  12. KDE4 is ~30% faster than KDE3 by kojot350 · · Score: 3, Informative

    KDE4 is ~30% faster than KDE3, mainly because of the Qt4 vs. Qt3 improvements and vast redesign of the KDE itself...

    --
    [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo *Click*
  13. Page's Law is really May's Law! by Winter+Lightning · · Score: 3, Informative

    "Page's law" is simply a restatement of May's law:

    "Software efficiency halves every 18 months, compensating Moore's Law".

    David May is a British Computer scientist who was the lead architect for the Transputer. See:
    http://en.wikipedia.org/wiki/David_May_(computer_scientist)
    and page 20 of:
    http://www.cs.bris.ac.uk/~dave/iee.pdf

  14. Google Native Client by bcrowell · · Score: 3, Insightful

    coming from google who are trying to make software be available only via a browser and clunky javascript makes this rather ironic

    The transcript leaves out a few things from the video, the main one being that Brin gives a list of applications he has specifically in mind: gmail, chrome, and Native Client. Of these, only gmail is a javascript application. Chrome doesn't run in a browser, Chrome is a browser. And Native Client is an attempt to get out of the very situation you're complaining about, where web-based apps have to be written in javascript. NativeClient (NaCl) is a browser plugin that allows native x86 code to run in a browser. If you read the paper on NaCl I linked to above, the emphasis on security is impressive. They clearly understand what a disaster things like ActiveX have been in terms of security, and they're serious about making it safe with all kinds of fancy techniques.

    A couple of other observations:

    They're not kidding about making performance a priority, it's not a new priority for them, and they seem to be doing well at it. When I first tried the Google Docs spreadsheet, its performance was completely unacceptable. A year or so later, it was mentioned on Slashdot again. I was all set to make a snarky post about its poor perfomance, but then I stopped and decided to try it again to see if the performance was still as bas as I remembered. It was much better, so I posted on Slashdot to say so. I then got an email from one of the developers working on Google Docs to say he was glad I'd noticed the improvement, because it had been their main priority recently.

    In the video, Brin refers to "Page's law" as the "inverse of Moore's law." I would actually say it's not so much an inverse of it as a corollary of it. Developers are always going to be as sloppy as they can get away with being, and they're always going to prefer to work with languages and APIs that give them the maximum amount of abstraction, platform-independence, and expressiveness. Software houses are always going to market proprietary software based on features (which the user can read about before making a decision to buy), not on performance (which the user can't test until he's paid for the software and tried it out on his own machine). Therefore they're always going to write software that performs as badly as they can get away with. That means that if Moore's law improves hardware performance by a factor of x over a certain period of time, software developers are just naturally going to write software that performs worse by a factor of x over that same period of time.

    The really scary thing about browser-based apps, in my opinion, is that they represent a huge threat to open-source software, exactly at the moment when the OSS software stack is starting to be pretty comprehensive, mature, and usable. If you look at the web apps out there, essentially all of them are under proprietary licenses, and nearly all of them are impossible to run without a server running the completely closed-source server-side code. Although Google generally seems pretty friendly toward OSS, I don't really want to have to rely on their good intentions. They are, after all, a publicly traded company, whose only reason for existing is to maximize returns for their shareholders. From this perspective, NaCl is actually pretty scary. The default with javascript is that at least you get to see the source code of the client-side software, even if it's under a proprietary license; I think it's only natural for me to demand this if my web browser is going to run random code off of some stranger's web site. With NaCl, the default will be that all I ever get to see is the object code of the program. This is even worse than java applets; java is actually relatively easy to disassemble into fairly readable source code. (And in any case, java applets never caught on.)