Template:Gaps/doc

Template:Gaps outputs its unnamed arguments in order, applying the  CSS rule to all but the first, so that there will be gaps of 0.25em between the arguments. The whole output has the  rule so that it will not be broken across several lines.

It supports up to twenty unnamed arguments. In addition, it supports the   and   arguments which can be used for numbers in exponential notation. The base will be assumed to be 10 unless otherwise specified; a hyphen-minus "-" in the exponent will be automatically substituted by a minus sign "&minus;". It also supports the arguments   and   for putting left-hand sides and units within the non-breaking span (see examples below).

See Wikipedia:Manual of Style (dates and numbers) § Delimiting (grouping of digits) for information about where to put the gaps in numbers.

Performance impact
Template:Gaps allows any number of parameters, and displays the gaps by setting the left-margin space of each group. The gaps are not actual spaces, so a copy/paste of the text is treated as connected, consecutive text. Although the text, as displayed, is consecutive as on-screen text, {gaps} for a number cannot be used in a calculation because the internal markup contains the invisible  tags which would be invalid text in typical numeric processing.