JavaScript V8 object against binary tree

Is there a faster way to search for data in JavaScript(in particular, V8through node.js, but without c / C ++ modules) than using JavaScript Object?

This may be deprecated , but assumes that a new class is dynamically generated for each individual object. Which made me wonder if the binary tree implementation could be faster, however this is not like the case .

The implementation of the binary tree is unbalanced, so it can be better with balancing (only the first 26 values ​​are roughly balanced manually).

Does anyone have an idea on why and how this can be improved? One more note: does the concept of a dynamic class really mean ~ 260,000 properties (in test testing of jsperf of the second channel), and then the chain of definitions of dynamic classes stored in memory?

+2
source share
1 answer

V8 uses the concept of "map", which describes the composition of the data in the object.

These maps can be “quick maps”, which determine a fixed offset from the beginning of the object in which a specific property can be found, or they can be a “dictionary map” that uses a hash table to provide a search mechanism.

, .

, . , , . , , .

, , .

, , ( , , , ), - V8 doesn ' t .

, (, , ), . -. , - -.

V8 ( Crankshaft), . , - .

, - , , . V8 , , . , - , , , .

, .

, V8 , .

, , , . , , 260 000 .

: - ( - ) , , ( ).

+2

All Articles