Global Cache Builtin Type

Global Builtin Type

A proposed Global builtin type caches ALL objects and computations, for later implicit assignment, to improve performance.

// Current
for(let i = 0; i < 1e7; i++)
{
    Foo.Bar[i] = 13 * 15 + i
    Foo.Baz[i] = 13 * 25 + i
}

// Current (partially-optimized)
let FooBar = Foo.Bar
let FooBaz = Foo.Baz
for(let i = 0; i < 1e7; i++)
{
    FooBar[i] = 13 * 15 + i
    FooBaz[i] = 13 * 25 + i
}

// New
option implicit Global

for(let i = 0; i < 1e7; i++)
{
    13 * 15 + i
    13 * 25 + i
}

Global['Foo.Bar[0].last[0][0]'] // 195
Global['Foo.Baz[0].last[1][0]'] // 325

This would cause a permanent memory leak.

1 Like

So you're saying there are no such innovations in the metal which support a memory guarded high-performance implicit cached object implementation ??

Regards,
Seagat2011