Skip to content

lift RTTI out of closure #120

@blackmius

Description

@blackmius

creating new object for each closure creation may influence on overall perfomance, why not lift RTTI object out of closure context and create it once, since types wont be changing in runtime.

function a() {
  return function b(param: number) {}
}

this code translates to something like this

function a() {
  return R.fn(function b(param) {}, {…RTTI data…})
}

its clear that each a call it creates new object with RTTI data
and it will be better to store it globally outside

const b_rtti_data = {}
function a() {
  return R.fn(function b(param) {}, b_rtti_data)
}

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