Platform
Resources
Pricing
Sign in
Get started
Dominik Moritz
Faculty at CMU (@cmudig) and researcher at @apple.
Workspace
Fork
Published
By
Dominik Moritz
Edited
May 19, 2021
Fork of
Stdlib Benchmark Template
Insert cell
Insert cell
3
function
coercing
(
b
)
{
const
x
=
Array
.
from
(
{
length
:
b
.
iterations
/
1000
}
)
.
map
(
(
d
)
=>
""
+
Math
.
random
(
)
)
;
b
.
tic
(
)
;
// start timing
for
(
let
i
=
0
;
i
<
b
.
iterations
;
i
++
)
{
const
v
=
x
[
i
&
0x3ff
]
;
v
==
null
;
}
b
.
toc
(
)
;
// end timing
b
.
end
(
)
;
// finish the benchmark
}
Insert cell
function
equality
(
b
)
{
const
x
=
Array
.
from
(
{
length
:
b
.
iterations
/
1000
}
)
.
map
(
(
d
)
=>
""
+
Math
.
random
(
)
)
;
b
.
tic
(
)
;
// start timing
for
(
let
i
=
0
;
i
<
b
.
iterations
;
i
++
)
{
const
v
=
x
[
i
&
0x3ff
]
;
v
===
null
||
v
===
undefined
;
}
b
.
toc
(
)
;
// end timing
b
.
end
(
)
;
// finish the benchmark
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Compare fork
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
coercing
Show 3 comments
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
equality
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
d3
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML