HaxeFoundation / HaxeFoundation/haxe

Populate cache from last context rather than hxb

Open
#11,519 5 comments 0 reactions 0 assignees View on GitHub
feature-hxb
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

The other day on slack we discussed whether or not it might make sense to "load" types from the last set of types rather than hxb, as it's probably easier on the CPU.

> **back2dos**
> [...] naively, I would somehow think that keeping a reference to the old state and "loading" from that, i.e. lookup in there and recursively clone what you find (while again looking up as you recurse), would accomplish the same with less CPU cycles [...]
> **simn**
> Yes a typed AST "reloading mapping" could perhaps work as well, now that we cleaned up quite a few related parts

I have no idea if it's truly worth the trouble or not. The [hxb PR](https://github.com/HaxeFoundation/haxe/pull/11504) mentions potential slowdown, so I thought I'd put forward the idea in case the ongoing optimization efforts fall short of delivering the desired performance (and assuming that this would indeed provide a speed up).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.