lib/std/file: no not flush on each write
authorJean Privat <jean@pryen.org>
Mon, 23 Mar 2015 07:43:13 +0000 (14:43 +0700)
committerJean Privat <jean@pryen.org>
Mon, 23 Mar 2015 07:43:13 +0000 (14:43 +0700)
Flushing for each small element of an output made things too slow.

real (not user) time for nitc/nitc/nitc:
before: 0m7.373s
after: 0m5.901s (-20%)

Signed-off-by: Jean Privat <jean@pryen.org>

lib/standard/file.nit

index 4d77955..a2856ae 100644 (file)
@@ -150,7 +150,6 @@ class FileWriter
                else
                        for i in s.substrings do write_native(i.to_cstring, i.length)
                end
-               _file.flush
        end
 
        redef fun close