FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
node/benchmark/string_decoder/string-decoder-create.js at main · nodejs/node · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
nodejs
/
node
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
36.6k
Star
120k
Code
Issues
632
Pull requests
746
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
node
/
benchmark
/
string_decoder
/
string-decoder-create.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
18 lines (16 loc) · 415 Bytes
Breadcrumbs
node
/
benchmark
/
string_decoder
/
string-decoder-create.js
Copy path
File metadata and controls
18 lines (16 loc) · 415 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
'use strict'
;
const
common
=
require
(
'../common.js'
)
;
const
StringDecoder
=
require
(
'string_decoder'
)
.
StringDecoder
;
const
bench
=
common
.
createBenchmark
(
main
,
{
encoding
:
[
'ascii'
,
'utf8'
,
'utf-8'
,
'base64'
,
'ucs2'
,
'UTF-8'
,
'AscII'
,
'UTF-16LE'
,
]
,
n
:
[
25e6
]
,
}
)
;
function
main
(
{
encoding
,
n
}
)
{
bench
.
start
(
)
;
for
(
let
i
=
0
;
i
<
n
;
++
i
)
{
new
StringDecoder
(
encoding
)
;
}
bench
.
end
(
n
)
;
}
Back
|
FazBrowse Home
|
New Git URL