in reply to Re^4: search array for closest lower and higher number from another array
in thread search array for closest lower and higher number from another array
You may want to consider the different types of disk I/O sub-systems in modern operating systems. Most *nix systems have Raw I/O support, Direct I/O support, Concurrent I/O support, Modular I/O support, etc. For example, most databases use raw I/O. Performance of these applications is usually better when using raw I/O rather than using other I/O methods, because it avoids the additional work of memory copies, logging, and inode locks.
My comment about perl was directed at which I/O subsystem perl was using, not that perl would be treated differently by that I/O sub-system.
When writing *nix utilities ( like grep ), system programmers were encouraged to write "cache aware" programs. Whenever possible, work on the cached version directly, and avoid memory to memory move/copy. ( For clarification, I use "move/copy" because the operating system may perform a move rather than a copy, but this happens in the paging I/O sub-system, and has to do with paging performance. This is transparent to the application. )
All I was trying to point out, was that a 500MB file on a test machine may be cached, but may not be cached on a production machine, and that a pure perl solution may very well be a better solution on a production machine. But that is the decision of the OP
"Well done is better than well said." - Benjamin Franklin
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: search array for closest lower and higher number from another array
by bigbot (Beadle) on Feb 07, 2011 at 07:06 UTC | |
by flexvault (Monsignor) on Feb 07, 2011 at 14:42 UTC | |
by bigbot (Beadle) on Feb 08, 2011 at 01:27 UTC |