Skip to content

Commit

Permalink
Correct benchmarking when running onces takes a long time; also fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno Le Floch committed Jun 10, 2018
1 parent b4f7b63 commit 9bf203a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions l3trial/l3benchmark/l3benchmark.dtx
Expand Up @@ -343,7 +343,7 @@ end
% number of operations. This can be redefined by the user.
% \begin{macrocode}
\cs_new_protected:Npn \benchmark_display:
{ \iow_term:x { \fp_to_tl:N \g_benchmark_time_fp ~ seconds } }
{ \iow_term:x { \fp_to_tl:N \g_benchmark_time_fp \c_space_tl seconds } }
\cs_new_protected:Npn \benchmark_display_in_ops:
{
\iow_term:x
Expand Down Expand Up @@ -567,7 +567,10 @@ end
\int_gset:Nn \g_@@_repeat_int { 1 }
\@@_raw:nN { \g_@@_code_tl } \g_@@_time_int
\int_compare:nNnF \g_@@_time_int < { \g_@@_duration_int / 2 }
{ \prg_break: }
{
\int_gset_eq:NN \g_@@_time_median_int \g_@@_time_int
\prg_break:
}
\int_while_do:nNnn \g_@@_time_int < { \g_@@_duration_int / 100 }
{
\int_compare:nNnT \g_@@_repeat_int > { \c_max_int / 4 }
Expand Down

0 comments on commit 9bf203a

Please sign in to comment.