Get Private vs Public properties (v5)

Revision 5 of this benchmark created on


Setup

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

Test runner

Ready to run.

Testing in
TestOps/sec
get private prop
c._pub;
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.