chakra-core / chakra-core/ChakraCore

Evaluate type transitions for adding properties on SimpleDictionaryTypeHandler

Open
#1,714 1 comment 0 reactions 0 assignees View on GitHub
Performance
Dominant language
JavaScript
Stars
9.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Today, if a type is `SimpleDictionaryTypeHandler` and is locked, properties added on it will evolve it to new type. 2 problems with that. We are introducing newer types in the runtime which will have less probability of types finding in cache. When we transition to new type, we do allocation to hold properties and then copy all the properties from old type to new type. So there is a memory as well as performance hit.

This issue is to evaluate if type transition is needed for `SimpleDictionaryTypeHandler` and if does, then come up with a solution that will avoid type transitions most of the time.

Contributor guide

Open the contributing guide

Research direction

Start by locating SimpleDictionaryTypeHandler and the logic that transitions a locked type when properties are added. Evaluate whether the transition is required, then define a solution that avoids unnecessary allocation and property copying; done means the design is validated against the stated memory and performance concerns.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, javascript
Domain
compilers, performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.