Get Private vs Public properties (v7)

Revision 7 of this benchmark created on


Setup

class C {
  #priv = 1;
  pub = 1;
  get priv() {
    return this.#priv;
  }
  get pub() {
    return this.pub;
  }
}
const c = new C;

Test runner

Ready to run.

Testing in
TestOps/sec
get private prop
c.priv;
ready
get public prop
c.pub;
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.