Skip to content

Pre-allocation syntax of tables #7

@Garanas

Description

@Garanas

The Lua of the game supports pre-allocation syntax when you create a new table: {&1&1} where 1 can be any number. The numbers allow us to define the second and third argument of the NEWTABLE operation. For more information:

Previously no file with that syntax was part of the repository. But the lazyvar.lua file uses it: FAForever/fa#3725 . It is also an interesting approach to get a 20% - 50% speed up on table allocations, according to benchmarks.

This compiler doesn't need to support the functionality. But it would be great if it would accept the syntax 😄 .

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