File: bench.ml

package info (click to toggle)
ocaml-spawn 0.17.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 212 kB
  • sloc: ansic: 569; ml: 374; makefile: 22
file content (8 lines) | stat: -rw-r--r-- 276 bytes parent folder | download
1
2
3
4
5
6
7
8
let%bench "exec true with Spawn.spawn" =
  Spawn.spawn () ~prog:"/bin/true" ~argv:[ "true" ] |> Unix.waitpid []
;;

let%bench "exec true with Caml.Unix.create_process" =
  Unix.create_process "/bin/true" [| "true" |] Unix.stdin Unix.stdout Unix.stderr
  |> Unix.waitpid []
;;