CS 412/413
Introduction to Compilers
Spring 2001

File Reversal

Reverses a text file, line-by-line.  A doubly-linked list is used to store each line of the file, then the list is traversed in reverse order and printed.  This tests your compiler's correctness in its ability to interface with the object-oriented part of the original Iota Standard Library.  Since the input is very large (10,732 lines, or about 100K) it also tests the efficiency of your method dispatch and object creation, as each line is represented by an object in the list.  Although the Iota programs are faster than the C++ and Java programs, this is probably because the Iota program uses a better data structure.

Source: [FileRev.im filerev.cpp FileRev.java]
filerev.txt (approx. first 100,000 lines of a dictionary)

C 0.13
D 0.14
E 0.14
B 0.16
C++ 0.63
Java 1.09