Skip to content

change internal class and object structure to use literals #3

@JosephLenton

Description

@JosephLenton

Based on this JSPerf here: http://jsperf.com/properties-vs-arrays/2 object literals are the fastest way to represent a class.

Methods will need to be re-build ahead of time, and then dynamically set to objets when they are created. They must NOT be created in the constructor!

One big issue is 'instanceof', everything will look like an object. But this is still faster.

Also need to build a real-test case testing the current implementation against a new one (a few games on PMC will do).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions