The difference in performance between native and non-native string
encoding (using the fastest js implementations I can manage to write,
granted) is at most 2x to 3x, which is certainly an improvement but
not enough to overcome the approximately order-of-magnitude difference
in overall encoding and decoding speed that we're looking at now.

So the benefit is that using a binary encoding will make sense in more
circumstances, but will still be slow enough that something
JSON-backed is a better choice in most cases.


On Mon, Aug 4, 2014 at 9:58 AM, David Nolen <dnolen.li...@gmail.com> wrote:
> On Mon, Aug 4, 2014 at 10:51 AM, Francis Avila <fav...@breezeehr.com> wrote:
>> I've looked closely at utf-8 encoders/decoders in JS vs TextEncoder, and I'm 
>> not sure fast string encoding/decoding alone is going to bring us the kind 
>> of speed improvements we need to make binary formats a clear win over JSON.  
>> (Some of this might be because the ArrayBuffer implementations are slower 
>> than they could be.)
>>
>> Relevant JSPerfs (bops is the library used by messagepack-js):
>>
>> http://jsperf.com/utf8-encoding-methods/2
>
> These numbers look very good, what are your reservations w/ respect to
> performance?
>
> David
>
> --
> Note that posts from new members are moderated - please be patient with your 
> first post.
> ---
> You received this message because you are subscribed to a topic in the Google 
> Groups "ClojureScript" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/clojurescript/xhdrGunEXPE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> clojurescript+unsubscr...@googlegroups.com.
> To post to this group, send email to clojurescript@googlegroups.com.
> Visit this group at http://groups.google.com/group/clojurescript.

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to