$ set def [.mapfile] $ javac *.java $ set def [-] $! java -cp . "mapfile.Gen" demo.txt $! java -cp . "mapfile.Read1" demo.txt $ java -cp . "mapfile.Read2" demo.txt VMS Software, Inc. 1.8.0_222 / OpenVMS V8.4-2L3 10000000 lines Read one line at a time : 5748 ms VMS Software, Inc. 1.8.0_222 / OpenVMS V8.4-2L3 10000000 lines Read one line at a time : 1514 ms VMS Software, Inc. 1.8.0_222 / OpenVMS V8.4-2L3 10000000 lines Read one line at a time : 1457 ms $ java -cp . "mapfile.Read3" demo.txt VMS Software, Inc. 1.8.0_222 / OpenVMS V8.4-2L3 10000000 lines Map file to memory : 964 ms VMS Software, Inc. 1.8.0_222 / OpenVMS V8.4-2L3 10000000 lines Map file to memory : 559 ms VMS Software, Inc. 1.8.0_222 / OpenVMS V8.4-2L3 10000000 lines Map file to memory : 292 ms $ cc read2 $ link read2 $ mcr sys$disk:[]read2 demo.txt 10000000 lines Read one line at a time : 2939 ms 10000000 lines Read one line at a time : 2927 ms 10000000 lines Read one line at a time : 2927 ms $ cc read3vms $ link read3vms $ mcr sys$disk:[]read3vms demo.txt 10000000 lines Map file to memory : 369 ms 10000000 lines Map file to memory : 358 ms 10000000 lines Map file to memory : 332 ms $ cc read3nix $ link read3nix $ mcr sys$disk:[]read3nix demo.txt 10000000 lines Map file to memory : 454 ms 10000000 lines Map file to memory : 444 ms 10000000 lines Map file to memory : 465 ms $ pas Read2 $ link Read2 $ mcr sys$disk:[]Read2 demo.txt 10000000 lines Read one line at a time : 31040 ms 10000000 lines Read one line at a time : 31040 ms 10000000 lines Read one line at a time : 31050 ms $ pas Read3 $ link Read3 $ mcr sys$disk:[]Read3 demo.txt 10000000 lines Read one line at a time : 450 ms 10000000 lines Read one line at a time : 510 ms 10000000 lines Read one line at a time : 520 ms $ python read1.py demo.txt 3.10.0 (default, Nov 25 2021, 10:52:09) [C] / OpenVMS-V8.4-2L3-HP_Integrity_rx2800_i2___1_60GH-IA64-32bit 10000000 lines Read all lines : 8267 ms 3.10.0 (default, Nov 25 2021, 10:52:09) [C] / OpenVMS-V8.4-2L3-HP_Integrity_rx2800_i2___1_60GH-IA64-32bit 10000000 lines Read all lines : 8368 ms 3.10.0 (default, Nov 25 2021, 10:52:09) [C] / OpenVMS-V8.4-2L3-HP_Integrity_rx2800_i2___1_60GH-IA64-32bit 10000000 lines Read all lines : 8319 ms $ python read2.py demo.txt 3.10.0 (default, Nov 25 2021, 10:52:09) [C] / OpenVMS-V8.4-2L3-HP_Integrity_rx2800_i2___1_60GH-IA64-32bit 10000000 lines Read one line at a time : 17141 ms 3.10.0 (default, Nov 25 2021, 10:52:09) [C] / OpenVMS-V8.4-2L3-HP_Integrity_rx2800_i2___1_60GH-IA64-32bit 10000000 lines Read one line at a time : 17115 ms 3.10.0 (default, Nov 25 2021, 10:52:09) [C] / OpenVMS-V8.4-2L3-HP_Integrity_rx2800_i2___1_60GH-IA64-32bit 10000000 lines Read one line at a time : 17147 ms $ python read3.py demo.txt 3.10.0 (default, Nov 25 2021, 10:52:09) [C] / OpenVMS-V8.4-2L3-HP_Integrity_rx2800_i2___1_60GH-IA64-32bit 10000000 lines Map file to memory : 344848 ms 3.10.0 (default, Nov 25 2021, 10:52:09) [C] / OpenVMS-V8.4-2L3-HP_Integrity_rx2800_i2___1_60GH-IA64-32bit 10000000 lines Map file to memory : 345261 ms 3.10.0 (default, Nov 25 2021, 10:52:09) [C] / OpenVMS-V8.4-2L3-HP_Integrity_rx2800_i2___1_60GH-IA64-32bit 10000000 lines Map file to memory : 345429 ms