• No results found

The l3benchmark package Experimental benchmarking

N/A
N/A
Protected

Academic year: 2021

Share "The l3benchmark package Experimental benchmarking"

Copied!
2
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

The l3benchmark package

Experimental benchmarking

The L

A

TEX Project

Released 2021-08-27

1

Benchmark

\g_benchmark_duration_target_fp

This variable (default value: 1) controls roughly for how long \benchmark:n will repeat code to more accurately benchmark it. The actual duration of one call to \benchmark:n typically lasts between half and twice \g_benchmark_duration_target_fp seconds, un-less of course running the code only once already lasts longer than this.

These variables store the results of the most recently run benchmark. \g_benchmark_-time_fp stores the time TEX took in seconds, and \g_benchmark_ops_fp stores the estimated number of elementary operations. The latter is not set by \benchmark_-tic:/\benchmark_toc:.

\g_benchmark_time_fp \g_benchmark_ops_fp

\benchmark_once_silent:n {⟨code ⟩} \benchmark_once:n {⟨code ⟩}

Determines the time \g_benchmark_time_fp (in seconds) taken by TEX to run the ⟨code⟩, and an estimated number \g_benchmark_ops_fp of elementary operations. In addition, \benchmark_once:n prints these values to the terminal. The ⟨code⟩ is run only once so the time may be quite inaccurate for fast code.

\benchmark_once:n \benchmark_once_silent:n

\benchmark:n {⟨code ⟩}

Determines the time \g_benchmark_time_fp (in seconds) taken by TEX to run the ⟨code⟩, and an estimated number \g_benchmark_ops_fp of elementary operations. In addition, \benchmark:n prints these values to the terminal. The ⟨code⟩ may be run many times and not within a group, thus code with side-effects may cause problems.

\benchmark:n \benchmark_silent:n

\benchmark_tic: ⟨slow code ⟩ \benchmark_toc:

When it is not possible to run \benchmark:n (e.g., the code is part of the execution of a package which cannot be looped) the tic/toc commands can be used instead to time between two points in the code. When executed, \benchmark_tic: will print a line to the terminal, and \benchmark_toc: will print a matching line with a time to indicate the duration between them in seconds. These commands can be nested.

\benchmark_tic: \benchmark_toc:

E-mail: latex-team@latex-project.org

(2)

Index

The italic numbers denote the pages where the corresponding entry is described, numbers underlined point to the definition, all others indicate the places where it is used.

Referenties

GERELATEERDE DOCUMENTEN

would create a paragraph shape in which the first line is the full width of the measure, the second line is indented by 2 pt on each side, the third line by 4 pt and the fourth line

\commonl@ypage This routine sets the layout page parameters common to both the standard and memoir classes, to those specified for the document, specifically as on the current

you no longer wish to re-generate your MetaPost figures, the package can be given the compilation=off option to save compilation time:.. \usepackage

The time package defines a command \now which typesets the current time in

Numbers written in italic refer to the page where the corresponding entry is de- scribed; numbers underlined refer to the code line of the definition; numbers in roman refer to the

However, remember that texsurgery is a python project whose main focus is on evaluating code inside a jupyter kernel, and this is only achieved by installing the python package

\l__unravel_setup_restore_tl This token list variable will contain code to restore category codes to their value when the package was loaded.. 20 \gdef \l__unravel_setup_restore_tl {

In this sense , it would be very interesting to have an available package which could turn easy the task of highlight some changes: \alert { alert a phrase ou period}; \highlight