in reply to Performance Trap - Opening/Closing Files Inside a Loop
Unless the Java programmer knows something you don't (like there are only 100 possibilities for filenames), I don't think their performance will beat an implementation that caches filehandles, as you described in your second example. I don't even think a C or Assembly program would be much faster; IMHO the time will be completely dominated by I/O and system calls.
One trick to be able to keep many filehandles open without worrying about consuming more resources than you intend to is the FileCache module.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Performance Trap - Opening/Closing Files Inside a Loop
by Limbic~Region (Chancellor) on Dec 10, 2004 at 00:27 UTC |