Commit graph

56 commits

Author SHA1 Message Date
panamafrancis
abda6cbbb0 Refactoring of Delta.IDs & horizon functionality with a PrimaryKey type, needed for implementing UUID based primary keys for backends such as the appengine datastore \n Tests: at top level and if available per backend, if not then just visual 2014-12-01 23:00:06 +01:00
kortschak
e2eea6c283 Convert Type fields to use graph.Type
Add text encoding methods to replace string storage.
2014-09-05 09:49:15 +09:30
kortschak
62013d3dfc Replace DebugString with Describe
This change makes tree description completely open to mechanical
analysis and ensures consistency between description formats for each of
the iterator types.

Renamed StatsContainer.(Kind -> Type) for consistency.
2014-09-05 09:32:09 +09:30
kortschak
bf6412b55d Run go vet
Bugs found.
2014-08-28 12:22:37 +09:30
kortschak
8118c8d3cc Quieten deadcode 2014-08-28 12:04:45 +09:30
kortschak
484bf145a8 Remove non-documentation lint
Because of extensive nature of changes, tested all three non-memstore
backends - passed.
2014-08-28 11:51:39 +09:30
kortschak
443a091b72 Rename triple entities were relevant 2014-08-27 21:27:01 +09:30
a371155cd2 Fix linksto and zero-costs 2014-08-16 06:30:27 -04:00
e453385d5e explain logging and weight fixing 2014-08-16 05:19:16 -04:00
f967b36f84 comments and concretized deltas 2014-08-14 01:24:39 -04:00
fe0569c9d4 merge with master 2014-08-13 23:03:07 -04:00
104e7d110d fix leveldb (and speed up hasa) 2014-08-13 13:08:50 -04:00
b6d966e9b5 fix and iterator, add some logging, and reenable 2014-08-12 16:38:10 -04:00
kortschak
99d44e3228 Add test and make it pass 2014-08-12 10:20:26 +09:30
664b37b9a6 Merge branch 'master' into log_database 2014-08-10 21:50:36 -04:00
aad21b0585 Fix aborted materialization 2014-08-10 21:49:57 -04:00
3770190db5 test clean 2014-08-10 20:10:00 -04:00
kortschak
191244c40e Sync iteration calls to Nexter interface changes 2014-08-07 07:07:45 +09:30
kortschak
62785d25c2 Merge branch 'master' into nexter
Conflicts:
	graph/leveldb/all_iterator.go
	graph/leveldb/iterator.go
	graph/memstore/triplestore.go
	query/gremlin/finals.go
2014-08-07 06:57:45 +09:30
b74cb142f0 Key/Keyer 2014-08-06 16:59:46 -04:00
2b43185117 rename Hashable/Hasher 2014-08-06 15:58:37 -04:00
840c341274 Fix ID Lookup 2014-08-06 15:39:55 -04:00
6f1e46c2d8 Fix hashability for graph.Value 2014-08-06 15:34:30 -04:00
2bec255b52 Copy refs and comment on Value 2014-08-06 14:37:37 -04:00
76efc2fcb7 redo data structure for sensibility 2014-08-06 04:07:30 -04:00
d102394836 bounds errors 2014-08-06 03:49:55 -04:00
24f57df859 fix overshoot and optimize better 2014-08-06 03:49:55 -04:00
09244ddd38 materialize implementation and and optimization 2014-08-06 03:49:55 -04:00
kortschak
6acfdcc5d6 Use concrete value for quad.Quad
Comparison of -short benchmarks in cayley.

$ benchcmp pointer.bench concrete.bench
benchmark                                   old ns/op     new ns/op	delta
BenchmarkNamePredicate                      1673276       1655093	-1.09%
BenchmarkLargeSetsNoIntersection            318985907     261499984	-18.02%
BenchmarkNetAndSpeed                        104403743     41516981	-60.23%
BenchmarkKeanuAndNet                        17309258      16857513	-2.61%
BenchmarkKeanuAndSpeed                      20159161      19282833	-4.35%

Comparison of pathological cases are not so happy.

benchmark                                   old ns/op       new ns/op		delta
BenchmarkVeryLargeSetsSmallIntersection     55269775527     246084606672	+345.24%
BenchmarkHelplessContainsChecker            23436501319     24308906949		+3.72%

Profiling the worst case:

Pointer:
Total: 6121 samples
    1973  32.2%  32.2%     1973  32.2% runtime.findfunc
     773  12.6%  44.9%      773  12.6% readvarint
     510   8.3%  53.2%      511   8.3% step
     409   6.7%  59.9%      410   6.7% runtime.gentraceback
     390   6.4%  66.2%      391   6.4% pcvalue
     215   3.5%  69.8%      215   3.5% runtime.funcdata
     181   3.0%  72.7%      181   3.0% checkframecopy
     118   1.9%  74.6%      119   1.9% runtime.funcspdelta
      96   1.6%  76.2%       96   1.6% runtime.topofstack
      76   1.2%  77.5%       76   1.2% scanblock

Concrete:
Total: 25027 samples
    9437  37.7%  37.7%     9437  37.7% runtime.findfunc
    3853  15.4%  53.1%     3853  15.4% readvarint
    2366   9.5%  62.6%     2366   9.5% step
    2186   8.7%  71.3%     2186   8.7% runtime.gentraceback
    1816   7.3%  78.5%     1816   7.3% pcvalue
    1016   4.1%  82.6%     1016   4.1% runtime.funcdata
     859   3.4%  86.0%      859   3.4% checkframecopy
     506   2.0%  88.1%      506   2.0% runtime.funcspdelta
     410   1.6%  89.7%      410   1.6% runtime.topofstack
     303   1.2%  90.9%      303   1.2% runtime.newstack
2014-08-05 23:25:02 +09:30
kortschak
b1a70d99aa Simplify Nexter interface
This change allows a Nexter to be used in the same manner as a scanner
using a for graph.Next(it) {} construction.

It is important that graph.Next(it) and any associated it.Result() calls
operate on the same iterator.
2014-08-01 09:15:02 +09:30
kortschak
f8e28e066e Rename NextResult -> NextPath
See discussion in #92.
2014-08-01 07:27:16 +09:30
kortschak
1606e98d9f Rename Check-ish -> Contains-ish
Contains[*] indicates what the check is for.

[*] I considered Has/Have, but settled on Contains to avoid confusion
with the HasA iterator.
2014-07-31 15:29:42 +09:30
kortschak
2dbbd17fe1 Merge branch 'declassify' into tip
Conflicts:
	graph/iterator/hasa_iterator.go
	graph/iterator/linksto_iterator.go
	graph/iterator/query_shape_test.go
	graph/leveldb/all_iterator.go
	graph/leveldb/iterator.go
	graph/leveldb/leveldb_test.go
	graph/memstore/triplestore_test.go
	graph/mongo/iterator.go
2014-07-30 16:40:37 +09:30
kortschak
d6f94be514 Base nexting on interface satisfaction
This is done unsubtlely at the moment and there is plenty of room for
optimisation of assertion location to prevent repeated reasserting as is
done now.
2014-07-30 16:06:46 +09:30
kortschak
b498a06a7b Intermediate step in removal of Base
We are marking types that will be Nexters and ResultNexters (I want a
better name for this one).
2014-07-30 15:21:48 +09:30
kortschak
375d953d93 Move current result handling out of Base
Delete majority of Base functionality.
2014-07-30 15:03:06 +09:30
kortschak
ee6d4c8db7 Move Size handling out of Base 2014-07-30 12:14:46 +09:30
kortschak
525230206a Move SubIterator handling out of Base 2014-07-30 12:11:14 +09:30
kortschak
189910c4b8 Remove Base dependency from Null 2014-07-30 12:08:44 +09:30
kortschak
01b7278c3a Move UID handling from Base
Also clean up some of the value creation code.
2014-07-30 11:44:58 +09:30
kortschak
1604dca737 Move tag handling out into graph.Tagger 2014-07-30 10:25:32 +09:30
kortschak
274d9ef57e Rename Provenance -> Label
's/Provenance/Label/g' 's/provenance/label/g' with human vetting.
2014-07-29 08:44:39 +09:30
Jeremy Jay
a83b7ea367 fix non-pointer uintptr -> uint64, export NextUID
Allows other iterator implementations to use global UID namespace.
2014-07-28 11:26:33 -04:00
kortschak
401c58426f Create quads hierarchy
* Move nquads into quad.
* Create cquads simplified parser in quad.
* Move Triple (renamed Quad) to quad.

Also made sure mongo actually implements BulkLoader.
2014-07-28 21:36:22 +09:30
Alex Peters
4d34ea50cc Fix typos and minor cleanup 2014-07-10 13:19:30 +02:00
kortschak
5bc1c438ef Tabulate value comparison tests 2014-07-07 12:01:16 +09:30
kortschak
1c181429da Purge goconvey and mock
These packages really impact on test readability with crazy action at a
distance. In addition to this removal of goconvey reduced the test run
time for leveldb on average by about 40-50%.
2014-07-05 22:00:46 +09:30
e4df9488e7 merge rename_fix 2014-07-03 16:02:54 -04:00
kortschak
cd46452b63 Enumerate iterator types 2014-07-03 09:57:31 +09:30
kortschak
447a835b93 Rename AddValue 2014-07-02 12:17:33 +09:30