File tree Expand file tree Collapse file tree 7 files changed +26
-26
lines changed
Expand file tree Collapse file tree 7 files changed +26
-26
lines changed Original file line number Diff line number Diff line change @@ -46,9 +46,9 @@ for (let lib of libs) {
4646 } ) ;
4747}
4848
49- console . log ( '\nExecuting Hermes bytecodes ...\n' ) ;
49+ console . log ( '\nExecuting Hermes benchmark ...\n' ) ;
5050
5151for ( let bench of benches ) {
52+ console . log ( `--- ${ bench . libName } ---\n` ) ;
5253 await $ ( { stdio : 'inherit' } ) `hermes ${ bench . hermesBin } ` ;
53- console . log ( ) ;
5454}
Original file line number Diff line number Diff line change 1- import { Segmenter } from '@formatjs/intl-segmenter/src/segmenter.js' ;
21import { inputs , simpleBench } from '../../_simple-bench.js' ;
32
4- const segmenter = new Segmenter ( ) ;
3+ import { Segmenter } from '../bundle-entries/formatjs-intl-segmenter.js' ;
4+ let segmenter = new Segmenter ( ) ;
55
66{
7- const result = simpleBench ( 1000 , ( ) => {
7+ let result = simpleBench ( 1000 , ( ) => {
88 void [ ...segmenter . segment ( inputs . small ) ] ;
99 } ) ;
1010
1111 print ( `@formatjs/intl-segmenter (small input)` ) ;
1212 print ( `samples: ${ result . samples } ` ) ;
1313 print ( `duration (avg): ${ result . avgDuration } ` ) ;
14+ print ( ) ;
1415}
1516
16-
1717{
18- const result = simpleBench ( 1000 , ( ) => {
18+ let result = simpleBench ( 1000 , ( ) => {
1919 void [ ...segmenter . segment ( inputs . medium ) ] ;
2020 } ) ;
2121
22- print ( ) ;
2322 print ( `@formatjs/intl-segmenter (medium input)` ) ;
2423 print ( `samples: ${ result . samples } ` ) ;
2524 print ( `duration (avg): ${ result . avgDuration } ` ) ;
25+ print ( ) ;
2626}
Original file line number Diff line number Diff line change 1- import GraphemeSplitter from 'grapheme-splitter' ;
21import { inputs , simpleBench } from '../../_simple-bench.js' ;
32
4- const graphemeSplitter = new ( GraphemeSplitter . default || GraphemeSplitter ) ( ) ;
3+ import { GraphemeSplitter } from '../bundle-entries/grapheme-splitter.js' ;
4+ let graphemeSplitter = new ( GraphemeSplitter . default || GraphemeSplitter ) ( ) ;
55
66{
7- const result = simpleBench ( 1000 , ( ) => {
7+ let result = simpleBench ( 1000 , ( ) => {
88 void [ ...graphemeSplitter . iterateGraphemes ( inputs . small ) ] ;
99 } ) ;
1010
1111 print ( `grapheme-splitter (small input)` ) ;
1212 print ( `samples: ${ result . samples } ` ) ;
1313 print ( `duration (avg): ${ result . avgDuration } ` ) ;
14+ print ( ) ;
1415}
1516
16-
1717{
18- const result = simpleBench ( 1000 , ( ) => {
18+ let result = simpleBench ( 1000 , ( ) => {
1919 void [ ...graphemeSplitter . iterateGraphemes ( inputs . medium ) ] ;
2020 } ) ;
2121
22- print ( ) ;
2322 print ( `grapheme-splitter (medium input)` ) ;
2423 print ( `samples: ${ result . samples } ` ) ;
2524 print ( `duration (avg): ${ result . avgDuration } ` ) ;
25+ print ( ) ;
2626}
Original file line number Diff line number Diff line change 1- import Graphemer from 'graphemer' ;
21import { inputs , simpleBench } from '../../_simple-bench.js' ;
32
4- const graphemer = new ( Graphemer . default || Graphemer ) ( ) ;
3+ import { Graphemer } from '../bundle-entries/graphemer.js' ;
4+ let graphemer = new ( Graphemer . default || Graphemer ) ( ) ;
55
66{
7- const result = simpleBench ( 1000 , ( ) => {
7+ let result = simpleBench ( 1000 , ( ) => {
88 void [ ...graphemer . iterateGraphemes ( inputs . small ) ] ;
99 } ) ;
1010
1111 print ( `graphemer (small input)` ) ;
1212 print ( `samples: ${ result . samples } ` ) ;
1313 print ( `duration (avg): ${ result . avgDuration } ` ) ;
14+ print ( ) ;
1415}
1516
1617
1718{
18- const result = simpleBench ( 1000 , ( ) => {
19+ let result = simpleBench ( 1000 , ( ) => {
1920 void [ ...graphemer . iterateGraphemes ( inputs . medium ) ] ;
2021 } ) ;
2122
22- print ( ) ;
2323 print ( `graphemer (medium input)` ) ;
2424 print ( `samples: ${ result . samples } ` ) ;
2525 print ( `duration (avg): ${ result . avgDuration } ` ) ;
26+ print ( ) ;
2627}
27-
Original file line number Diff line number Diff line change 1- import { graphemeSegments } from '../../../src/grapheme.js' ;
21import { inputs , simpleBench } from '../../_simple-bench.js' ;
32
3+ import { graphemeSegments } from '../bundle-entries/unicode-segmenter.js' ;
4+
45{
5- const result = simpleBench ( 1000 , ( ) => {
6+ let result = simpleBench ( 1000 , ( ) => {
67 void [ ...graphemeSegments ( inputs . small ) ] ;
78 } ) ;
89
910 print ( `unicode-segmenter/grapheme (small input)` ) ;
1011 print ( `samples: ${ result . samples } ` ) ;
1112 print ( `duration (avg): ${ result . avgDuration } ` ) ;
13+ print ( ) ;
1214}
1315
1416{
15- const result = simpleBench ( 1000 , ( ) => {
17+ let result = simpleBench ( 1000 , ( ) => {
1618 void [ ...graphemeSegments ( inputs . medium ) ] ;
1719 } ) ;
1820
19- print ( ) ;
2021 print ( `unicode-segmenter/grapheme (medium input)` ) ;
2122 print ( `samples: ${ result . samples } ` ) ;
2223 print ( `medium input (avg): ${ result . avgDuration } ` ) ;
24+ print ( ) ;
2325}
Original file line number Diff line number Diff line change 11import { inputs , simpleBench } from '../../_simple-bench.js' ;
22
33import { GraphemeSplitter } from '../bundle-entries/grapheme-splitter.bundle.js' ;
4-
54let graphemeSplitter = new ( GraphemeSplitter . default || GraphemeSplitter ) ( ) ;
65
76{
Original file line number Diff line number Diff line change 11import { inputs , simpleBench } from '../../_simple-bench.js' ;
22
33import { Graphemer } from '../bundle-entries/graphemer.bundle.js' ;
4-
54let graphemer = new ( Graphemer . default || Graphemer ) ( ) ;
65
76{
You can’t perform that action at this time.
0 commit comments