Commit graph

10 commits

Author SHA1 Message Date
kortschak
22bad1701f Generate code for parser
G2 code generation used after benchmarking.

style	benchmark           old ns/op     new ns/op     delta
T0		BenchmarkParser     672           5631          +737.95%
T1		BenchmarkParser     672           5579          +730.21%
G0		BenchmarkParser     672           4049          +502.53%
G1		BenchmarkParser     672           3868          +475.60%
G2		BenchmarkParser     672           3543          +427.23%

F0 and F1 create massive Go source (6.0M) and so were not tested.

Invalid tests removed, additional tests for invalid input to be added
later.
2014-07-24 21:31:04 +09:30
kortschak
92d50bb9f7 Add parser generation definition 2014-07-24 20:57:19 +09:30
kortschak
f1c606dc19 Provide standalone converter for 30kmoviesdata.nt 2014-07-24 20:08:05 +09:30
kortschak
018b8ca032 Add package prefix to errors 2014-07-23 06:30:35 +09:30
kortschak
0e0e382d2b Use error returns and interface type for parsing
Fixes issue #72

This change simplifies interactions with parsing N-Quads and makes
reading datasets more robust. Changes made while here also improve
performance:

benchmark           old ns/op     new ns/op     delta
BenchmarkParser     1058          667           -36.96%

We still use string concatenation which I'm not wildly happy about, but
I think this can be left for a later change.

Initial changes towards idiomatic error handling have been made. More
significant changes are needed, but these have subtle design implication
and need to be thought about more.

30kmoviesdata.nt.gz has been altered to properly escape double quotes.
This was done mechanically and with manual curation to pick up
straglers.
2014-07-22 20:34:37 +09:30
kortschak
03fb6e367a Remove dependency on goconvey 2014-07-03 19:00:21 +09:30
kortschak
1768e593a8 Move iterators into separate package
Also reduce API exposure and use standard library more - and fix bugs I
previously introduces in mongo.
2014-07-01 09:21:32 +09:30
kortschak
0a03cec497 Replace string type with graph.Direction
This conversion is not complete as there are still uses of string
directions via the Direction.String method in leveldb.
2014-06-30 12:41:03 +09:30
kortschak
177059cc16 Destutter nquads 2014-06-28 13:33:00 +09:30
kortschak
e0df752618 Reorganize to go get will work
This makes almost no changes to source, but touches every almost file.

Also fixes error in gremlin test code.
2014-06-26 09:04:17 +09:30