From e3419dd76e18f5b460290892d4143aab0b1982ef Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Mon, 23 Mar 2015 14:43:13 +0700 Subject: [PATCH 1/1] lib/std/file: no not flush on each write 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 --- lib/standard/file.nit | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/standard/file.nit b/lib/standard/file.nit index 4d77955..a2856ae 100644 --- a/lib/standard/file.nit +++ b/lib/standard/file.nit @@ -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 -- 1.7.9.5