Developers should be able to use Map/Set instead of normal JS objects, but still get predictable performance. We should inline the lookup and hash calculate for Map#get, Map#has and Set#has. Optimizing Map#set and Set#add wouldn't hurt.
Created attachment 8905667 [details] [diff] [review] Call Map::has and Set::has directly I was curious how much it would help to optimize those functions to a direct call. Even on six-speed's map-set-lookup this doesn't really seem to make a difference at all. I guess we could use the AliasSet to hoist this, but that is just cheating, we aren't actually faster. We probably have to write custom inlining code for this. Best case even with compile time hashing for constants, even though this probably doesn't help much in the real world.
You need to log in before you can comment on or make changes to this bug.