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

perf(http): cache webidl.converters lookups in ext/fetch/23_response.js #26256

Merged
merged 3 commits into from
Oct 15, 2024

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Oct 15, 2024

Code:

Deno.bench("response", () => {
  const responses = [];
  for (var i = 0; i < 1024 * 1024; i++) {
    responses.push(new Response(i.toString()));
  }
  return responses;
});

Before:

response           572.2 ms           1.7 (443.7 ms … 752.5 ms) 679.6 ms 752.5 ms 752.5 ms

After:

response           543.3 ms           1.8 (369.5 ms … 721.8 ms) 606.3 ms 721.8 ms 721.8 ms

Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dsherret dsherret merged commit 4c9eee3 into denoland:main Oct 15, 2024
17 checks passed
@dsherret dsherret deleted the perf_cache_webidl_converters_lookup branch October 15, 2024 03:25
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.

2 participants