package jupyter
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
An OCaml kernel for Jupyter
Install
dune-project
Dependency
Authors
Maintainers
Sources
v3.0.1.tar.gz
md5=27079d43a5134a740428623185807029
sha512=40929cacd1ddc0379c84438bcda3edce47ab571ea27ff5f597b5e88fc38c9198cc69442e334e05c64d854763c162c2e8266497dbc413134beb71db00d11df6ce
doc/jupyter.notebook/Jupyter_notebook/Bench/index.html
Module Jupyter_notebook.BenchSource
Benchmark functions
Types
Source
type 'a t = {b_rtime : 'a;(*Real time for the process
*)b_utime : 'a;(*User time for the process
*)b_stime : 'a;(*System time for the process
*)
}The type of execution time of functions or code snippets.
'a is float or stat.
Source
type stat = {bs_mean : float;(*Mean of execution time per a loop
*)bs_std : float;(*Standard deviation of execution time per a loop
*)
}The type of summary results of repeated measurement of execution time.
Benchmark
Source
val timeit :
?runs:int ->
?loops_per_run:int ->
?before_run:(unit -> unit) ->
?after_run:(unit -> unit) ->
(unit -> 'a) ->
stat ttimeit ?runs ?loops_per_run ?before_run ?after_run f repeatedly executes a function f, and measures the mean and the standard deviation of each execution time of f ().
for i = 1 to runs do
before_run () ;
(* --- start measurement of execution time of each run --- *)
for _ = 1 to loops_per_run do
ignore (f ()) ;
done ;
(* --- finish measurement --- *)
after_run () ;
donetimeit is inspired by timeit package in Python. The parameter loops_per_run, before_run are named as number, setup respectively in Python.
Pretty printers
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page