On 31 March 2013 22:21, Alex Bradbury <[email protected]> wrote: > My test program simply prints "hello?" and sleeps for 60 seconds. I > run 5 of these processes, and then collect the memory usage. A full > log is below, but in summary my results for Rust (0.6RC), C (glibc 2.5 > and gcc 4.7.2) and Go (1.0.3) are as follows. Results are in format > Private + Shared = Total, see ps_mem.py for the memory accounting > methodology.
I added Haskell (ghc 7.4.2) and Ocaml to the mix. Rust: 8.9 MiB + 785.0 KiB = 9.7 MiB hello (5) C: 452.0 KiB + 55.0 KiB = 507.0 KiB hello (5) Go: 1.9 MiB + 520.0 KiB = 2.4 MiB hello (5) Haskell: 1.6 MiB + 497.5 KiB = 2.1 MiB hello (5) Ocaml: 1.1 MiB + 237.5 KiB = 1.3 MiB hello (5) $ cat hello.hs import Control.Concurrent main = do putStrLn "hello?" threadDelay (60*1000000) $ ghc -O3 hello.hs $ for i in 1 2 3 4 5; do ./hello & done $ sudo python ~/ps_mem.py | grep -i hello 1.6 MiB + 497.5 KiB = 2.1 MiB hello (5) $ cat hello.ml print_endline "hello?";; Unix.sleep 60;; $ ocamlopt unix.cmxa hello.ml -o hello $ for i in 1 2 3 4 5; do ./hello & done $ sudo python ~/ps_mem.py | grep -i hello 1.1 MiB + 237.5 KiB = 1.3 MiB hello (5) _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
