diff --git a/bench/bench_bounded_q.ml b/bench/bench_bounded_q.ml index ec486849..6e000b5d 100644 --- a/bench/bench_bounded_q.ml +++ b/bench/bench_bounded_q.ml @@ -3,6 +3,8 @@ open Picos_structured open Picos_sync module Queue = Stdlib.Queue +let is_ocaml4 = String.starts_with ~prefix:"4." Sys.ocaml_version + module Bounded_q : sig type 'a t @@ -119,7 +121,7 @@ let run_one ~budgetf ~n_adders ~n_takers ?(n_msgs = 10 * Util.iter_factor) () = let wrap _ () = Scheduler.run in let work domain_index () = Flock.join_after @@ fun () -> - Flock.fork yielder; + if not is_ocaml4 then Flock.fork yielder; if domain_index < n_adders then let rec work () = let n = Countdown.alloc n_msgs_to_add ~domain_index ~batch:100 in diff --git a/bench/bench_spawn.ml b/bench/bench_spawn.ml index c169899e..a2ac607b 100644 --- a/bench/bench_spawn.ml +++ b/bench/bench_spawn.ml @@ -1,6 +1,8 @@ open Multicore_bench open Picos +let is_ocaml4 = String.starts_with ~prefix:"4." Sys.ocaml_version + let factor = Util.iter_factor * if String.starts_with ~prefix:"4." Sys.ocaml_version then 1 else 10 @@ -31,4 +33,5 @@ let run_one ~budgetf () = ~work () |> Times.to_thruput_metrics ~n:n_spawns ~singular:"spawn" ~config -let run_suite ~budgetf = if Sys.int_size <= 32 then [] else run_one ~budgetf () +let run_suite ~budgetf = + if Sys.int_size <= 32 || is_ocaml4 then [] else run_one ~budgetf ()