Skip to content
This repository was archived by the owner on Jan 10, 2019. It is now read-only.
This repository was archived by the owner on Jan 10, 2019. It is now read-only.

Typed Objects/Value Types #3

Open
@max-mapper

Description

@max-mapper

One of the issues with JavaScript for numeric computing is memory bandwidth. I'll define that as meaning how long the CPU has to wait for memory operations to complete. The way you make numeric code faster is by being more efficient with your available memory bandwidth, i.e. storing things in memory more efficiently.

I highly recommend reading the 'Values' section of Five Things That Make Go Fast

The summary at the end of that section is:

  • Go lets you create compact data structures, avoiding unnecessary indirection.
  • Compact data structures utilise the cache better.
  • Better cache utilisation leads to better performance.

JavaScript currently fails at these three items. Two years ago there was activity on a proposal called Typed Objects, which would enable much more memory efficient data structures in JS:

Another part of the proposal is called Value Types, which would enable creating custom primitive JS types that are made up out of Typed Objects. Currently the primitive types are things like String, Number, Object but there are not very flexible, Value Types is a specification about how to create custom types.

However activity has died off lately, and there is currently no champion for the Typed Objects/Value Types proposal.

  • It would be nice to find a champion for this feature
  • We should try to help prioritize this feature
  • Building a better summary of why this feature is important could help the standards process

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions