endojs / endo

Endo is a distributed secure JavaScript sandbox, based on SES
Apache License 2.0
819 stars 71 forks source link

Create a cross-implementation microbenchmarking tool #2197

Open gibson042 opened 6 months ago

gibson042 commented 6 months ago

What is the Problem Being Solved?

We frequently have a need to measure the performance of JavaScript snippets and code blocks in V8 or XS, and sometimes in both. This can serve purposes as simple as comparing alternative implementations of a function (e.g., str.replace(/^#/, "") vs. str.startsWith("#") ? str.slice(1) : str), diagnosing time complexity issues, and even analyzing behavior of agoric-sdk contracts and vats.

Description of the Design

Create an esbench tool that wraps eshost for testing across ECMAScript implementations.

Security Considerations

n/a

Scaling Considerations

The tool should provide some way to limit execution time.

Test Plan

TBD

Compatibility Considerations

n/a

Upgrade Considerations

n/a