Skip to content

Localize Math.imul #26

@hjerabek

Description

@hjerabek

I have been reading through the hash implementations you provide and I noticed that you often use Math.imul within the iteration step. You seem to be interested in high performance, so I presume you won't mind me suggesting the following (premature) optimization:

Localize imul (var imul=Math.imul) in all functions that use it in the loop. Otherwise, EVERY call to Math.imul in EVERY iteration step requires traversing the whole context tree (and checking every context for the Math property) up to the global scope, and then looking up the imul property.

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