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 _______________________________________________ help-smalltalk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-smalltalk
