Slashdot Mirror


No, It's Not Always Quicker To Do Things In Memory

itwbennett writes: It's a commonly held belief among software developers that avoiding disk access in favor of doing as much work as possible in-memory will results in shorter runtimes. To test this assumption, researchers from the University of Calgary and the University of British Columbia compared the efficiency of alternative ways to create a 1MB string and write it to disk. The results consistently found that doing most of the work in-memory to minimize disk access was significantly slower than just writing out to disk repeatedly (PDF).

5 of 486 comments (clear)

  1. The new antipattern by ubergeek65536 · · Score: 3, Funny

    Sorry but you'll need to do it without using any memory. We need to make it fast.

  2. Re:It depends by Anonymous Coward · · Score: 5, Funny

    Was their paper peer reviewed?

    It just was. Why do you ask?

    lololol

  3. HOT BREAKING NEWS! by Alsee · · Score: 5, Funny

    NEW SCIENTIFIC DISCOVERY!
    For n equal to one million, an O(n^2) algorithm is slower than an O(n) algorithm. Even when the O(n^2) algorithm is run in RAM, and the O(n) algorithm is disk writes being buffered and optimized by the operating system.

    I'll take my Nobel Prize now, thank you.

    -

    --
    - - You can't take something off the Internet! That's like trying to take pee out of a swimming pool.
  4. We're all doing it wrong! by jetkust · · Score: 5, Funny

    Maybe we should store our files in memory and load them into the harddrive to do calculations.

  5. Re:It depends by Beat+The+Odds · · Score: 3, Funny

    Was their paper peer reviewed?

    I believe that it may have been beer reviewed.