chakra-core / chakra-core/ChakraCore

Chakra doesn't seem to inline very well compared to other JS jit implementations.

Open
#3,442 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

I've been noticing this for years and I think I reported an old connect bug along these lines, but if you take some method heavy JS and run it in different engines, Chakra always seems to come out the worst for wear and you generally need to manually inline along the hot paths to normalize performance. I was trying to evaluate the different performance of various setter/getter techniques the other day and was struck by this again:

https://jsperf.com/different-setter-getter-methods-2

In this benchmark having a super simple "get" method which should be easily inlined (presumably) performs 80% slower than a direct property read in Edge (latest stable). And this kind of disparity has existed in edge/IE for years. Meanwhile if you run the same benchmark for Chrome/Safari/FF the results are much closer, and identical in some cases, seeming to indicate the method has been entirely optimized away.

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.