Re: json parsing performance

2015-04-07 Thread Martin Nowak via Digitalmars-d
On 04/06/2015 11:09 PM, Brad Anderson wrote:
 
 We actually have a JSON parser meant to replace std.json that should be
 very high performance. You can try it out now using dub:
 
 http://code.dlang.org/packages/std_data_json

It also includes a stream parser for the highest performance requirements.
http://s-ludwig.github.io/std_data_json/stdx/data/json/parser/parse_json_stream.html


Re: json parsing performance

2015-04-06 Thread cym13 via Digitalmars-d

On Monday, 6 April 2015 at 20:20:06 UTC, Kingsley wrote:
I have read that std.json is pretty slow compared to other 
languages json parsers and I'm about to do a whole stack of 
json parsing and was wondering if anyone has got any benchmarks 
to indicate what slow means compared to other languages - 
particularly java, ruby, python?


I want to know whether to roll up the sleeves and write my own 
json parser focused on performance or if slow just means a few 
ms slower - which I could live with.


I don't know much about json parsers so I can't say if it is a 
good one but it was subject to many discussions lately: 
https://github.com/kostya/benchmarks/tree/master/json


Re: json parsing performance

2015-04-06 Thread Laeeth Isharc via Digitalmars-d

On Monday, 6 April 2015 at 20:20:06 UTC, Kingsley wrote:
I have read that std.json is pretty slow compared to other 
languages json parsers and I'm about to do a whole stack of 
json parsing and was wondering if anyone has got any benchmarks 
to indicate what slow means compared to other languages - 
particularly java, ruby, python?


I want to know whether to roll up the sleeves and write my own 
json parser focused on performance or if slow just means a few 
ms slower - which I could live with.



Have you looked at vibe.d?  You don't need to pull in the whole 
thing.  Docs are a bit obscure, so easiest thing is to read the 
unit tests.



Laeeth


json parsing performance

2015-04-06 Thread Kingsley via Digitalmars-d
I have read that std.json is pretty slow compared to other 
languages json parsers and I'm about to do a whole stack of json 
parsing and was wondering if anyone has got any benchmarks to 
indicate what slow means compared to other languages - 
particularly java, ruby, python?


I want to know whether to roll up the sleeves and write my own 
json parser focused on performance or if slow just means a few ms 
slower - which I could live with.






Re: json parsing performance

2015-04-06 Thread Kingsley via Digitalmars-d

On Monday, 6 April 2015 at 20:26:15 UTC, cym13 wrote:

On Monday, 6 April 2015 at 20:20:06 UTC, Kingsley wrote:
I have read that std.json is pretty slow compared to other 
languages json parsers and I'm about to do a whole stack of 
json parsing and was wondering if anyone has got any 
benchmarks to indicate what slow means compared to other 
languages - particularly java, ruby, python?


I want to know whether to roll up the sleeves and write my own 
json parser focused on performance or if slow just means a few 
ms slower - which I could live with.


I don't know much about json parsers so I can't say if it is a 
good one but it was subject to many discussions lately: 
https://github.com/kostya/benchmarks/tree/master/json


great thanks. Hmm when I ran the test json I got a 212MB json 
file which the tests used. So  although the std.json takes around 
10 seconds to parse this - I can probably live with that and 
spend my energy getting on with my project. Of course it would 
have been nice to see the performance of std.json closer to that 
of rust and go instead of closer to ruby.


Re: json parsing performance

2015-04-06 Thread Brad Anderson via Digitalmars-d

On Monday, 6 April 2015 at 20:20:06 UTC, Kingsley wrote:
I have read that std.json is pretty slow compared to other 
languages json parsers and I'm about to do a whole stack of 
json parsing and was wondering if anyone has got any benchmarks 
to indicate what slow means compared to other languages - 
particularly java, ruby, python?


I want to know whether to roll up the sleeves and write my own 
json parser focused on performance or if slow just means a few 
ms slower - which I could live with.


We actually have a JSON parser meant to replace std.json that 
should be very high performance. You can try it out now using dub:


http://code.dlang.org/packages/std_data_json

I used it recently though I didn't do any performance testing. 
The improvements to Algebraic would help make it more pleasant to 
use.


Re: json parsing performance

2015-04-06 Thread Andrei Alexandrescu via Digitalmars-d

On 4/6/15 2:09 PM, Brad Anderson wrote:

On Monday, 6 April 2015 at 20:20:06 UTC, Kingsley wrote:

I have read that std.json is pretty slow compared to other languages
json parsers and I'm about to do a whole stack of json parsing and was
wondering if anyone has got any benchmarks to indicate what slow
means compared to other languages - particularly java, ruby, python?

I want to know whether to roll up the sleeves and write my own json
parser focused on performance or if slow just means a few ms slower -
which I could live with.


We actually have a JSON parser meant to replace std.json that should be
very high performance. You can try it out now using dub:

http://code.dlang.org/packages/std_data_json

I used it recently though I didn't do any performance testing. The
improvements to Algebraic would help make it more pleasant to use.


Sönke, what's the status of this? -- Andrei


Re: json parsing performance

2015-04-06 Thread weaselcat via Digitalmars-d

On Monday, 6 April 2015 at 21:09:32 UTC, Brad Anderson wrote:

On Monday, 6 April 2015 at 20:20:06 UTC, Kingsley wrote:
I have read that std.json is pretty slow compared to other 
languages json parsers and I'm about to do a whole stack of 
json parsing and was wondering if anyone has got any 
benchmarks to indicate what slow means compared to other 
languages - particularly java, ruby, python?


I want to know whether to roll up the sleeves and write my own 
json parser focused on performance or if slow just means a few 
ms slower - which I could live with.


We actually have a JSON parser meant to replace std.json that 
should be very high performance. You can try it out now using 
dub:


http://code.dlang.org/packages/std_data_json

I used it recently though I didn't do any performance testing. 
The improvements to Algebraic would help make it more pleasant 
to use.


Which improvements to algebraic?


Re: json parsing performance

2015-04-06 Thread Brad Anderson via Digitalmars-d

On Tuesday, 7 April 2015 at 00:36:30 UTC, weaselcat wrote:

On Monday, 6 April 2015 at 21:09:32 UTC, Brad Anderson wrote:

On Monday, 6 April 2015 at 20:20:06 UTC, Kingsley wrote:
I have read that std.json is pretty slow compared to other 
languages json parsers and I'm about to do a whole stack of 
json parsing and was wondering if anyone has got any 
benchmarks to indicate what slow means compared to other 
languages - particularly java, ruby, python?


I want to know whether to roll up the sleeves and write my 
own json parser focused on performance or if slow just means 
a few ms slower - which I could live with.


We actually have a JSON parser meant to replace std.json that 
should be very high performance. You can try it out now using 
dub:


http://code.dlang.org/packages/std_data_json

I used it recently though I didn't do any performance testing. 
The improvements to Algebraic would help make it more pleasant 
to use.


Which improvements to algebraic?


Sönke describes them here: 
http://forum.dlang.org/post/lt5s76$is$1...@digitalmars.com