On Fri, Apr 19, 2019 at 9:16 AM J Decker <d3c...@gmail.com> wrote:
>
> A question came to mind about the resolution of the 'compilation' of code.. I 
> have message handlers that receive an object with a standard field 'op'.  
> Then for each 'op' that can be processed I have an if test and a small amount 
> of code to handle the message (either inline or calling a function).
>
> Would it be better to call a function for each message handler, or is the 
> code within the if block consider a specific type of message?
> Given that there is time lost to just calling a function and creating its 
> closure too...

V8 emits ICs (inline caches) inside the if block. IOW, the simple
solution should be best. :-)

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to