let profiling_enabled = true
type profiler = { profile : 'a 'b. ('a -> 'b) -> 'a -> 'b }
-let profile =
- if profiling_enabled then
+let profile ?(enable = true) =
+ if profiling_enabled && enable then
function s ->
let total = ref 0.0 in
let profile f x =