Hi,

1. Numbers:
   About the tagging technique, Objects and small integer are both to be 
set as 32 bits. 
   Further, they use the bottom bit as the tagged value. if the bit is set, 
then this means that 31 bits are object pointers
   (Does this mean each bit points to the object accordingly?).
   Otherwise, then that 31 bits represent integer values.
   I think my understanding so far is correct. Let me know if I am wrong 
here.
   However, I dont really understand why v8 does this and how this tagging 
technique can improve the performance.

2. Arrays:
    I went through the slides, there are two types of ways that how v8 
handles elements:
    1. Fast elements: Linear storage for compact key sets.
        This is understandable that this one should be very fast. But I 
dont know what does "key sets" mean here?
    2. Dictionary elements: Hash table storage.
        The speaker(Google i/o 2012) mentions this one is much more compact 
than the first one.
        I thought this one is slower because the v8 switches to this mode 
because the array is sparse.
        Why the speaker says this one is more compact?
    3. As the speaker gave an example,
        var A = new Array();
        A[0] = 77;
        A[1] = 88;
        A[2] = 0.5;
        A[3] = true;
        This will cause the hidden class changes a couple of times which 
cost resources.
   
        The better way suggested by v8 is:
        var A= [77,88,0.5,true];
        He said this is a hint to v8. But could any one explain this more 
specifically on how v8 take this single allocation?


Some questions here. Thanks for your reply in advance.



Regards-
 

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to