Nick Coghlan gmail.com> writes:
> Consider trying:
>
> import sys
> sys.modules["_json"] = 0 # Block the C extension
> import json
>
> in a fresh interpreter.
>
Thanks for the tip. The revised script at
https://gist.github.com/924626
shows more believable numbers vis-à-vis the no-speedups c
On Mon, Apr 18, 2011 at 10:19 AM, Vinay Sajip wrote:
> It's quite likely that I've failed to turn off the stdlib json speedups
> (though
> I attempted to turn them off for both encoding and decoding), which would
> explain the big disparity in the non-speedup case. Perhaps someone with more
> fam
Stefan Behnel behnel.de> writes:
> Is this using the C accelerated version in both cases? What about the pure
> Python versions? Could you provide numbers for both?
What I posted earlier were C-accelerated timings. I'm not sure exactly how to
turn off the speedups for stdlib json. With some ass
> Of course, people might find other workloads which show bigger disparity in
> performance, or might find something in my 3.x port of simplejson which
> invalidates my finding of a 2% difference.
Thanks a lot for doing this research, by the way.
Regards,
Martin
__
On Sun, 17 Apr 2011 17:09:17 +0100
Michael Foord wrote:
> On 17/04/2011 07:28, "Martin v. Löwis" wrote:
> >> Well, there was a 5x speedup demonstrated comparing simplejson to the
> >> standard library json module.
> > Can you kindly point to that demonstration?
> >
> Hmm... according to a later em
On 17/04/2011 17:05, Michael Foord wrote:
On 17/04/2011 00:16, Antoine Pitrou wrote:
On Sat, 16 Apr 2011 23:48:45 +0100
Michael Foord wrote:
On 16/04/2011 22:28, "Martin v. Löwis" wrote:
Am 16.04.2011 21:13, schrieb Vinay Sajip:
Martin v. Löwis v.loewis.de> writes:
Does it actually ne
On 17/04/2011 07:28, "Martin v. Löwis" wrote:
Well, there was a 5x speedup demonstrated comparing simplejson to the
standard library json module.
Can you kindly point to that demonstration?
Hmm... according to a later email in this thread it is 350ms vs 250ms
for an 11kb sample. That's a nice
On 17/04/2011 00:16, Antoine Pitrou wrote:
On Sat, 16 Apr 2011 23:48:45 +0100
Michael Foord wrote:
On 16/04/2011 22:28, "Martin v. Löwis" wrote:
Am 16.04.2011 21:13, schrieb Vinay Sajip:
Martin v. Löwis v.loewis.de> writes:
Does it actually need improvement?
I can't actually say, but
Vinay Sajip, 17.04.2011 12:33:
Antoine Pitrou writes:
Feel free to share your numbers.
I've now got my fork working on Python 3.2 with speedups. According to a
non-scientific simple test:
Python 2.7
==
Python version: 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
[GCC 4.5.2]
11.21484375
On Sun, 17 Apr 2011 09:21:32 +0200
Stefan Behnel wrote:
> Antoine Pitrou, 16.04.2011 19:27:
> > On Sat, 16 Apr 2011 16:47:49 + (UTC)
> > Vinay Sajip wrote:
> >> Bob made a comment in passing that simplejson (Python) is about as fast as
> >> stdlib json (C extension), on 2.x.
> >
> > I think Bo
Stefan Behnel behnel.de> writes:
> Well, if that is not possible, then the CPython devs will have a hard time
> maintaining the json accelerator module in the long run. I quickly skipped
> through the github version in simplejson, and it truly is some complicated
> piece of code. Not in the se
Antoine Pitrou pitrou.net> writes:
> Feel free to share your numbers.
I've now got my fork working on Python 3.2 with speedups. According to a
non-scientific simple test:
Python 2.7
==
Python version: 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
[GCC 4.5.2]
11.21484375 KiB read
Timing si
On Sun, Apr 17, 2011 at 08:22:20AM +0200, Stefan Behnel wrote:
> Matt Billenstein, 17.04.2011 00:47:
> >On Sat, Apr 16, 2011 at 01:30:13PM +0200, Antoine Pitrou wrote:
> >>On Sat, 16 Apr 2011 00:41:03 +
> >>Matt Billenstein wrote:
> >>>
> >>>Slightly less crude benchmark showing simplejson is q
Antoine Pitrou, 16.04.2011 19:27:
On Sat, 16 Apr 2011 16:47:49 + (UTC)
Vinay Sajip wrote:
Bob made a comment in passing that simplejson (Python) is about as fast as
stdlib json (C extension), on 2.x.
I think Bob tested with an outdated version of the stdlib json module
(2.6 or 2.7, perhaps
> Well, there was a 5x speedup demonstrated comparing simplejson to the
> standard library json module.
Can you kindly point to that demonstration?
> That sound like *very* worth pursuing (and
> crazy not to pursue). I've had json serialisation be the bottleneck in
> web applications generating s
Matt Billenstein, 17.04.2011 00:47:
On Sat, Apr 16, 2011 at 01:30:13PM +0200, Antoine Pitrou wrote:
On Sat, 16 Apr 2011 00:41:03 +
Matt Billenstein wrote:
Slightly less crude benchmark showing simplejson is quite a bit faster:
http://pastebin.com/g1WqUPwm
250ms vs 5.5s encoding and decod
On Sat, Apr 16, 2011 at 01:30:13PM +0200, Antoine Pitrou wrote:
> On Sat, 16 Apr 2011 00:41:03 +
> Matt Billenstein wrote:
> >
> > Slightly less crude benchmark showing simplejson is quite a bit faster:
> >
> > http://pastebin.com/g1WqUPwm
> >
> > 250ms vs 5.5s encoding and decoding an 11KB
On Sat, 16 Apr 2011 23:48:45 +0100
Michael Foord wrote:
> On 16/04/2011 22:28, "Martin v. Löwis" wrote:
> > Am 16.04.2011 21:13, schrieb Vinay Sajip:
> >> Martin v. Löwis v.loewis.de> writes:
> >>
> >>> Does it actually need improvement?
> >> I can't actually say, but I assume it keeps changing
On 16/04/2011 22:28, "Martin v. Löwis" wrote:
Am 16.04.2011 21:13, schrieb Vinay Sajip:
Martin v. Löwis v.loewis.de> writes:
Does it actually need improvement?
I can't actually say, but I assume it keeps changing for the better - albeit
slowly. I wasn't thinking of specific improvements, ju
Martin v. Löwis v.loewis.de> writes:
> I can see three possible areas of improvment:
> 1. Bugs: if there are any, they should clearly be fixed. However, JSON
>is a simple format, so the implementation should be able to converge
>to something fairly correct quickly.
> 2. Performance: there
Am 16.04.2011 21:13, schrieb Vinay Sajip:
> Martin v. Löwis v.loewis.de> writes:
>
>> Does it actually need improvement?
>
> I can't actually say, but I assume it keeps changing for the better - albeit
> slowly. I wasn't thinking of specific improvements, just the idea of
> continuous
> improve
Martin v. Löwis v.loewis.de> writes:
> Does it actually need improvement?
I can't actually say, but I assume it keeps changing for the better - albeit
slowly. I wasn't thinking of specific improvements, just the idea of continuous
improvement in general...
Regards,
Vinay Sajip
_
> I agree, my suggestion is orthogonal to the question of who maintains stdlib
> json. But if the json module is languishing in comparison to simplejson, then
> bringing the code bases closer together may be worthwhile.
Right: *if* the module is languishing. But it's not. It just diverges.
> It m
On Sat, 16 Apr 2011 16:47:49 + (UTC)
Vinay Sajip wrote:
>
> > What you're proposing doesn't address the question of who is going to
> > do the ongoing maintenance.
>
> I agree, my suggestion is orthogonal to the question of who maintains stdlib
> json.
No, that's not what I'm talking about.
> > I've contributed a couple of patches myself after they were integrated
> > to CPython (they are part of the performance improvements Bob is talking
> > about), but that was exceptional. Backporting a patch to another project
> > with a different directory structure, a slightly different code,
Hi Antoine,
Antoine Pitrou pitrou.net> writes:
> What you're proposing doesn't address the question of who is going to
> do the ongoing maintenance.
I agree, my suggestion is orthogonal to the question of who maintains stdlib
json. But if the json module is languishing in comparison to simplejs
On 2011-04-16, at 17:25 , Antoine Pitrou wrote:
> Le samedi 16 avril 2011 à 17:07 +0200, Xavier Morel a écrit :
>> On 2011-04-16, at 16:52 , Antoine Pitrou wrote:
>>> Le samedi 16 avril 2011 à 16:42 +0200, Dirkjan Ochtman a écrit :
On Sat, Apr 16, 2011 at 16:19, Antoine Pitrou wrote:
> Wh
On Sat, 16 Apr 2011 18:04:53 +0200
Stefan Behnel wrote:
>
> Well, if that is not possible, then the CPython devs will have a hard time
> maintaining the json accelerator module in the long run. I quickly skipped
> through the github version in simplejson, and it truly is some complicated
> pie
On Saturday, April 16, 2011, Antoine Pitrou wrote:
> Le samedi 16 avril 2011 à 17:07 +0200, Xavier Morel a écrit :
>> On 2011-04-16, at 16:52 , Antoine Pitrou wrote:
>> > Le samedi 16 avril 2011 à 16:42 +0200, Dirkjan Ochtman a écrit :
>> >> On Sat, Apr 16, 2011 at 16:19, Antoine Pitrou wrote:
>>
Antoine Pitrou, 16.04.2011 16:19:
On Sat, 16 Apr 2011 09:50:25 + (UTC)
Vinay Sajip wrote:
If it is generally considered desirable to maintain some synchrony between
simplejson and stdlib json, then since Bob has stated that he no interest in
Python 3, it may be better to:
1. Convert the si
Le samedi 16 avril 2011 à 17:07 +0200, Xavier Morel a écrit :
> On 2011-04-16, at 16:52 , Antoine Pitrou wrote:
> > Le samedi 16 avril 2011 à 16:42 +0200, Dirkjan Ochtman a écrit :
> >> On Sat, Apr 16, 2011 at 16:19, Antoine Pitrou wrote:
> >>> What you're proposing doesn't address the question of
On 2011-04-16, at 16:52 , Antoine Pitrou wrote:
> Le samedi 16 avril 2011 à 16:42 +0200, Dirkjan Ochtman a écrit :
>> On Sat, Apr 16, 2011 at 16:19, Antoine Pitrou wrote:
>>> What you're proposing doesn't address the question of who is going to
>>> do the ongoing maintenance. Bob apparently isn't
Le samedi 16 avril 2011 à 16:42 +0200, Dirkjan Ochtman a écrit :
> On Sat, Apr 16, 2011 at 16:19, Antoine Pitrou wrote:
> > What you're proposing doesn't address the question of who is going to
> > do the ongoing maintenance. Bob apparently isn't interested in
> > maintaining stdlib code, and pyth
On Sat, Apr 16, 2011 at 16:19, Antoine Pitrou wrote:
> What you're proposing doesn't address the question of who is going to
> do the ongoing maintenance. Bob apparently isn't interested in
> maintaining stdlib code, and python-dev members aren't interested in
> maintaining simplejson (assuming it
Hello Vinay,
On Sat, 16 Apr 2011 09:50:25 + (UTC)
Vinay Sajip wrote:
>
> If it is generally considered desirable to maintain some synchrony between
> simplejson and stdlib json, then since Bob has stated that he no interest in
> Python 3, it may be better to:
>
> 1. Convert the simplejson
Sandro Tosi gmail.com> writes:
> Luckily, upstream is receptive for patches, so part of the job is to
> forward patches written for cpython not already in the upstream code.
Further to my earlier response to your post, I should mention that my fork of
simplejson at
https://github.com/vsajip/sim
On Sat, 16 Apr 2011 00:41:03 +
Matt Billenstein wrote:
>
> Slightly less crude benchmark showing simplejson is quite a bit faster:
>
> http://pastebin.com/g1WqUPwm
>
> 250ms vs 5.5s encoding and decoding an 11KB json object 1000 times...
This doesn't have much value if you don't say which
Sandro Tosi gmail.com> writes:
> The version we have in cpython of json is simplejson 2.0.9 highly
> patched (either because it was converted to py3k, and because of the
> normal flow of issues/bugfixes) while upstream have already released
> 2.1.13 .
I think you mean 2.1.3?
> Their 2 roads ha
On Fri, Apr 15, 2011 at 05:03:55PM -0700, Bob Ippolito wrote:
> On Fri, Apr 15, 2011 at 4:12 PM, Antoine Pitrou wrote:
> > On Fri, 15 Apr 2011 14:27:04 -0700
> > Bob Ippolito wrote:
> >> On Fri, Apr 15, 2011 at 2:20 PM, Antoine Pitrou
> >> wrote:
> >
> > Well, here's a crude microbenchmark. I'm
On Fri, Apr 15, 2011 at 05:03:55PM -0700, Bob Ippolito wrote:
> On Fri, Apr 15, 2011 at 4:12 PM, Antoine Pitrou wrote:
> > On Fri, 15 Apr 2011 14:27:04 -0700
> > Bob Ippolito wrote:
> >> On Fri, Apr 15, 2011 at 2:20 PM, Antoine Pitrou
> >> wrote:
> >
> > Well, here's a crude microbenchmark. I'm
On Fri, Apr 15, 2011 at 4:12 PM, Antoine Pitrou wrote:
> On Fri, 15 Apr 2011 14:27:04 -0700
> Bob Ippolito wrote:
>> On Fri, Apr 15, 2011 at 2:20 PM, Antoine Pitrou wrote:
>> > Le vendredi 15 avril 2011 à 14:18 -0700, Bob Ippolito a écrit :
>> >> On Friday, April 15, 2011, Antoine Pitrou wrote:
On Fri, 15 Apr 2011 14:27:04 -0700
Bob Ippolito wrote:
> On Fri, Apr 15, 2011 at 2:20 PM, Antoine Pitrou wrote:
> > Le vendredi 15 avril 2011 à 14:18 -0700, Bob Ippolito a écrit :
> >> On Friday, April 15, 2011, Antoine Pitrou wrote:
> >> >>
> >> >> > Since the JSON spec is set in stone, the cha
On Fri, Apr 15, 2011 at 2:20 PM, Antoine Pitrou wrote:
> Le vendredi 15 avril 2011 à 14:18 -0700, Bob Ippolito a écrit :
>> On Friday, April 15, 2011, Antoine Pitrou wrote:
>> >>
>> >> > Since the JSON spec is set in stone, the changes
>> >> > will mostly be about API (indentation, object convers
Le vendredi 15 avril 2011 à 14:18 -0700, Bob Ippolito a écrit :
> On Friday, April 15, 2011, Antoine Pitrou wrote:
> >>
> >> > Since the JSON spec is set in stone, the changes
> >> > will mostly be about API (indentation, object conversion, etc)
> >> > and optimization. I presume the core parsing
On Friday, April 15, 2011, Antoine Pitrou wrote:
>>
>> > Since the JSON spec is set in stone, the changes
>> > will mostly be about API (indentation, object conversion, etc)
>> > and optimization. I presume the core parsing logic won't
>> > be changing much.
>>
>> Actually the core parsing logic
>
> > Since the JSON spec is set in stone, the changes
> > will mostly be about API (indentation, object conversion, etc)
> > and optimization. I presume the core parsing logic won't
> > be changing much.
>
> Actually the core parsing logic is very different (and MUCH faster),
Are you talking a
On Thu, Apr 14, 2011 at 2:29 PM, Raymond Hettinger
wrote:
>
> On Apr 14, 2011, at 12:22 PM, Sandro Tosi wrote:
>
>> The version we have in cpython of json is simplejson 2.0.9 highly
>> patched (either because it was converted to py3k, and because of the
>> normal flow of issues/bugfixes) while ups
On Apr 14, 2011, at 12:22 PM, Sandro Tosi wrote:
> The version we have in cpython of json is simplejson 2.0.9 highly
> patched (either because it was converted to py3k, and because of the
> normal flow of issues/bugfixes) while upstream have already released
> 2.1.13 .
>
> Their 2 roads had dive
> - what are we going to do in the long run? how can we assure we'll be
> having a healthy collaboration with upsteam? f.e. in case a bug is
> reported (and later on fixed) in cpython? is there a policy for
> projects present in cpython and also maintained elsewhere?
>
> At the end: do you have so
On Thu, 14 Apr 2011 21:22:27 +0200
Sandro Tosi wrote:
>
> But how am I going to do this? let's do a brain-dump:
IMHO, you should compute the diff between 2.0.9 and 2.1.3 and try to
apply it to the CPython source tree (you'll probably have to change the
file paths).
> - what are we going to do i
50 matches
Mail list logo