help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] performance of the json parser


From: Robin Redeker
Subject: Re: [Help-smalltalk] performance of the json parser
Date: Mon, 5 Nov 2007 11:14:20 +0100
User-agent: Mutt/1.5.11+cvs20060403

On Sun, Nov 04, 2007 at 07:21:55PM +0000, Stephen Compall wrote:
> On Sun, 2007-11-04 at 14:00 +0100, Robin Redeker wrote:
> > And indeed, skipping the iconv step would just test the JSON parser
> > itself. In my application that uses the JSON parser I actually can't
> > skip that step as I get the data from the network and have to run it
> > through iconv anyways.
> 
> I don't mean the input; of course that should be iconved.  I'm referring
> to the data structures produced by the program.
> 
> A UnicodeString, if written out, may do the conversion anyway in a way
> similar to how it's done now; however, it will also first ask whether
> the stream supports UnicodeString handling, in which case it'll rely on
> the stream to recode it properly.
> 
> With the attached patch and removing use of "outputEncoding" from the
> example, I got 2/22/3 with a great reduction in outliers (opposed to
> 5/34/14 before).
> 
> Let me know if you like it and I'll add it to my archive.
> 

I like it! Especially the 5/34/14 -> 2/22/3 is incredible!

> -   str := ReadWriteStream on: UnicodeString new.
> +   str := WriteStream on: (UnicodeString new: 8).

Whats the magic behind 8?



Robin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]