Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(bench/deno_common): track Date.now() as upper bound #9922

Merged
merged 1 commit into from
Mar 28, 2021

Conversation

AaronO
Copy link
Contributor

@AaronO AaronO commented Mar 28, 2021

This is another simple extension of the cli/bench/deno_common.js "benchsuite".

It benches Date.now() (a v8 builtin) to provide an indication of the upper bound for non-NOP ops.
(This should be our practical upper bound for all ops, even with v8 Fast API)

Benches as of 1.8.2

On my M1 Air:

❯ deno -V; deno run --unstable -A ./cli/bench/deno_common.js
deno 1.8.2
date_now:            	n = 500000, dt = 0.021s, r = 23809524/s, t = 42ns/op
perf_now:            	n = 500000, dt = 0.700s, r = 714286/s, t = 1400ns/op
url_parse:           	n = 50000, dt = 0.712s, r = 70225/s, t = 14240ns/op
read_zero:           	n = 500000, dt = 0.758s, r = 659631/s, t = 1516ns/op
write_null:          	n = 500000, dt = 0.739s, r = 676590/s, t = 1478ns/op

@AaronO AaronO changed the title feat(bench/deno_common): track Date.now() as upper bound reference feat(bench/deno_common): track Date.now() as upper bound Mar 28, 2021
@bartlomieju bartlomieju merged commit 269ea88 into denoland:main Mar 28, 2021
@AaronO AaronO deleted the bench/deno-common-date-now branch April 2, 2021 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants