diff --git a/query/benchmark/README.txt b/query/benchmark/README.txt index 284e79e88fbf60c2b3046bbf9210758b2e72efb8..7a47b931fcdc11f19bc4a844901adae9325c5426 100644 --- a/query/benchmark/README.txt +++ b/query/benchmark/README.txt @@ -45,3 +45,23 @@ BenchmarkToPB_1000_Director 300 3980677 ns/op 395600 B/op 7376 We can see that ToProtocolBuffer method allocates less memory and takes lesser time than ToJson method. + +20 May 2016 +These are the benchmarking results after changing type of Value in x.DirectedEdge, +type of ObjectValue in NQuad to []byte and using the byte slice directly from +flatbuffers instead of parsing into an interface.(Commit SHA - 480b1337f). We +can see tremendous improvement(>50% on an average) for all metrics. For exact +percentage change, we can run benchcmp to compare the metrics. + +BenchmarkToJSON_10_Actor-4 50000 27497 ns/op 7626 B/op 113 allocs/op +BenchmarkToJSON_10_Director-4 30000 54688 ns/op 16229 B/op 228 allocs/op +BenchmarkToJSON_100_Actor-4 10000 137853 ns/op 37333 B/op 619 allocs/op +BenchmarkToJSON_100_Director-4 5000 334310 ns/op 92971 B/op 1428 allocs/op +BenchmarkToJSON_1000_Actor-4 2000 780858 ns/op 240419 B/op 3863 allocs/op +BenchmarkToJSON_1000_Director-4 500 3599711 ns/op 986670 B/op 15867 allocs/op +BenchmarkToPB_10_Actor-4 500000 3252 ns/op 664 B/op 15 allocs/op +BenchmarkToPB_10_Director-4 300000 4991 ns/op 976 B/op 21 allocs/op +BenchmarkToPB_100_Actor-4 30000 44771 ns/op 8008 B/op 145 allocs/op +BenchmarkToPB_100_Director-4 20000 60952 ns/op 10672 B/op 218 allocs/op +BenchmarkToPB_1000_Actor-4 5000 366134 ns/op 56217 B/op 958 allocs/op +BenchmarkToPB_1000_Director-4 2000 908611 ns/op 150163 B/op 3080 allocs/op diff --git a/query/benchmark/actors10.bin b/query/benchmark/actors10.bin index 7c8e357b4a004f2935c9d18f4df01445020f646a..8b4292ee7f4ff6a6190b6f560a5cb19d5d6785a2 100644 Binary files a/query/benchmark/actors10.bin and b/query/benchmark/actors10.bin differ diff --git a/query/benchmark/actors100.bin b/query/benchmark/actors100.bin index 1913d51d53728b2b3a25f0c1c2033c0309f2a95c..2437b8219bd761f33118654dde5444e2aa142573 100644 Binary files a/query/benchmark/actors100.bin and b/query/benchmark/actors100.bin differ diff --git a/query/benchmark/actors1000.bin b/query/benchmark/actors1000.bin index e68e12919c6211372b8ad5345ee05ba81f1b99b4..4d056be5940c0073dfff0f06cf0813e9481eca54 100644 Binary files a/query/benchmark/actors1000.bin and b/query/benchmark/actors1000.bin differ diff --git a/query/benchmark/directors10.bin b/query/benchmark/directors10.bin index 30626b0ddb0bc0f008d89eace50f25f51aa58dc5..439a2ac91ff25e8f56a05693ea25a3bcecd1179e 100644 Binary files a/query/benchmark/directors10.bin and b/query/benchmark/directors10.bin differ diff --git a/query/benchmark/directors100.bin b/query/benchmark/directors100.bin index f490b15013d0b8a59179c33591a9fcb6a0de6485..1bb2990bc0d8a4d4fa8b53c2950ef7f48a86e36e 100644 Binary files a/query/benchmark/directors100.bin and b/query/benchmark/directors100.bin differ diff --git a/query/benchmark/directors1000.bin b/query/benchmark/directors1000.bin index 8e362902146e92ac589233ea614fbb4c1d019a51..4c98a60b5d42f6512c1bee3d42b056de7d09911f 100644 Binary files a/query/benchmark/directors1000.bin and b/query/benchmark/directors1000.bin differ