CL-USER> (dolist (max '(10 100 1000)) (format t "~2% max = ~D ~%" max) (finish-output) (time (make-grid-dfa 10)))
max = 10
Real time: 0.030129 sec. Run time: 0.03 sec. Space: 614340 Bytes
max = 100
Real time: 0.080329 sec. Run time: 0.07 sec. Space: 614340 Bytes GC: 1, GC time: 0.05 sec.
max = 1000
Real time: 0.027293 sec. Run time: 0.03 sec. Space: 614340 Bytes NIL CL-USER> (dolist (max '(10 100 1000)) (format t "~2% max = ~D ~%" max) (finish-output) (time (make-grid-dfa max)))
In the first case, the output shows, but actually it's at the end. In the second case, since we've got O(n^2) processing time, I'm still waiting the first line!
Pascal J.Bourguignon pjb@informatimago.com writes:
CL-USER> (dolist (max '(10 100 1000)) (format t "~2% max = ~D ~%" max) (finish-output) (time (make-grid-dfa 10)))
[...]
In the first case, the output shows, but actually it's at the end. In the second case, since we've got O(n^2) processing time, I'm still waiting the first line!
Is the problem that FINISH-OUTPUT doesn't make the output visible, and you have to wait until the evaluation finishes? Which Lisp are you using?
-Luke