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: Sun, 4 Nov 2007 01:07:29 +0100
User-agent: Mutt/1.5.11+cvs20060403

On Sat, Nov 03, 2007 at 06:06:05PM -0500, Stephen Compall wrote:
> On Sat, 2007-11-03 at 18:57 +0100, Robin Redeker wrote:
> > The same string takes, in the fast C JSON parser I know, only 0.0165 ms.
> > And the slowes C JSON parser I know takes 0.147 ms.  I don't know how
> > fast smalltalk is when it comes down to string processing, but I
> > certainly would not expect an avg of 9ms to parse that string, at least
> > not with that variance. There must be something else that slows this
> > down so much.
> 
> How about GC?
> 
> Try rerunning the test showing every time result.  If it seems that GC
> is running pretty often, remember that every Iconv makes its own
> 1000-byte buffer, in addition to whatever bytes you use in parsing.
> 
> And of course encoding support has its own overhead.  How are those C
> parsers in that field?

Well, those only operate on unicode characters as the json
implementation does. But they indeed don't do any encoding stuff.
So that might explain a bit of the overhead, and also the GC stuff might
be explain the bad performance. Is GC known to cause multiple ms long
breaks?

If I make a list of iterations I get:

   27
   5
   22
   5
   7
   24
   6
   24
   5
   21
   ...

Does the GC run that often? And still, I find 17 a _quite_ long
pause for a GC run, but I'm of course not used to GC systems as I've been
using refcounting systems for most of the time now.


Robin




reply via email to

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