aboutsummaryrefslogtreecommitdiff
path: root/bench/snippets/text-encoder.mjs
blob: cee84bf25f48de84892c508071b1bfb24846a7f5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { bench, run } from "mitata";

var short = "Hello World!";
var shortUTF16 = "Hello World 💕💕💕";
var long = "Hello World!".repeat(1024);
var longUTF16 = "Hello World 💕💕💕".repeat(1024);
var encoder = new TextEncoder();

bench(`4 ascii`, () => {
  encoder.encode("heyo");
});

bench(`4 utf8`, () => {
  encoder.encode("💕💕");
});

bench(`${short.length} ascii`, () => {
  encoder.encode(short);
});

bench(`${short.length} utf8`, () => {
  encoder.encode(shortUTF16);
});

bench(`${long.length} ascii`, () => {
  encoder.encode(long);
});

bench(`${longUTF16.length} utf8`, () => {
  encoder.encode(longUTF16);
});

await run();
Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/packages/astro/test/fixtures (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2021-08-03Fix portfolio example (#987)Gravatar Maksim Markelov 1-1/+1
2021-08-03Improve Collection docs for RSS (#990)Gravatar Joshua Stübner 1-1/+5
2021-08-03Improve code sample for lit integration (#991)Gravatar tobi-or-not-tobi 1-4/+6
2021-08-03fix: Exclude remote srcset URLs (#986)Gravatar Maarten Van Hoof 2-1/+8
2021-08-03Make Astro.request available to all astro components (#960)Gravatar Matthew Phillips 7-15/+53
2021-08-02Add `lang` variable to docs frontmatter for translations (#984)Gravatar Caleb Jasik 4-0/+4
2021-08-01Update styling.md re link-handling for .scss files (#977)Gravatar Bryce Wray 1-1/+3
2021-08-01add support for 4-letter language codes (ex: zh-TW)Gravatar Fred K. Schott 1-1/+1
2021-08-02[ci] yarn formatGravatar FredKSchott 3-11/+10
2021-08-01full translation (#967)Gravatar Fred K. Schott 9-83/+85
2021-08-01Update CONTRIBUTING.mdGravatar Fred K. Schott 1-3/+3
2021-08-02[ci] yarn formatGravatar FredKSchott 1-3/+1
2021-08-01Update and rename contributing.md to CONTRIBUTING.mdGravatar Fred K. Schott 1-0/+29
2021-08-01Delete COMMUNITY.mdGravatar Fred K. Schott 1-15/+0
2021-07-31fix bad merge from outdated layoutGravatar Fred K. Schott 3-3/+3
2021-07-30Fixes throwing 404 (#894)Gravatar Maciej Palmowski 1-3/+0
2021-07-30small cleanup to installation docsGravatar Fred K. Schott 1-9/+6
2021-07-30add finnish to language selectorGravatar Fred K. Schott 2-2/+5
2021-07-30move finnish translations to fiGravatar Fred K. Schott 3-0/+0
2021-07-30WIP: Documentation in Finnish (#837)Gravatar Vesa Piittinen 3-0/+201
2021-07-30📘 DOC: Add PostCSS configuration on Astro (#947)Gravatar Diogo Felix 1-0/+27
2021-07-30fix styling URL linkGravatar Fred K. Schott 1-1/+1
2021-07-31[ci] yarn formatGravatar FredKSchott 6-36/+61
2021-07-30fix styling guide (#961)Gravatar Rubens de Melo 1-1/+1
2021-07-30Add svelte file extension to tailwind puge configuration. (#964)Gravatar allanvobraun 1-1/+1
2021-07-30Docs site cleanup (#948)Gravatar Fred K. Schott 57-730/+739
2021-07-30Ascii quotes (#928)Gravatar Marcus Otterström 8-63/+63
2021-07-30forced degit template extraction in case of non empty installation directory ...Gravatar mash-graz 2-23/+7
2021-07-30Version Packages (#940)Gravatar github-actions[bot] 26-34/+45
2021-07-30[ci] yarn formatGravatar matthewp 1-1/+1
2021-07-30Fix Vue components nesting and add tests (#924)Gravatar Bartek Igielski 10-34/+171
2021-07-30[ci] yarn formatGravatar FredKSchott 1-1/+0
2021-07-30Fix typos and clarify docs (#880)Gravatar Marcus Otterström 4-4/+5
2021-07-29move translated nl docsGravatar Fred K. Schott 3-1/+1