Skip to content

%slower reporting seems wrong #12

@Craig-Macomber

Description

@Craig-Macomber

I wrote a trivial test to make sure the tool was working which tended to be "Infinity" ops per second, which is apparently -Infinift% slower than 2,806,756,516 ops per second. The tool should never report infinite performance. Also, infinite performance should be faster than finite performance.

I then wrote a more real test comparing refs and weakrefs: https://jsperf.app/zinupu

The times were 5,522,394 ops per second and 258,163 ops per second. The ratio here is 21.39.

There are several common ways to report this as a percentage but I do not think it is valid to say B is "95% slower" which is what is reported by the tool.

We can say A is 21.39 times faster than B. We can say A is 2039% faster than B. We can say A is 2139% the speed of B. We can say B is 21.39 times slower than B. Or B takes 2039% longer than A, or that B takes 2139% the time of A. We can also say that A takes 4.7% the time of B.

For a simpler example: if something takes 4 times as long, its a quarter as fast or 4 times as slow. Its not 75% slower.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions