/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // @ts-check
// Split each step of the benchmark into separate JS functions so that performance // profiles are easy to analyze.
function benchmarkDateTimeFormatConstructor() { for (let i = 0; i < 1000; i++) { // Create a random configuration powered by a pseudo-random number generator. This // way the configurations will be the same between 2 different runs. const localeString = pickRepresentativeLocale();
// Measure the constructor.
measureConstructor.start(); const locale = new Intl.Locale(localeString);
measureConstructor.stop();
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.