memgraph/src
Teon Banek 88de3422d0 Use stack allocation for cypher function arguments
Summary:
This is a simple change which modifies interface of
awesome_memgraph_functions to accept C-style pointer to array with
count. Doing things this way, allows us to easily try out different
allocation schemes for function arguments. In this diff, we are now
using stack allocation of arguments in a plain fixed size array. This is
done when the number of arguments is small. According to heaptrack, this
small change should yield noticeable improvements to heap usage.

Obviously, this doesn't solve the problem of heap allocations inside
TypedValue arguments themselves. These allocations appear when
std::string and std::vector is used inside TypedValue.

Micro benchmarks show that there is some performance improvement,
mostly around the limits of using array vs std::vector. The improvement is
more noticeable with multiple threads, due to primary gain being in avoiding
calls to memory allocation.

Reviewers: mtomic, msantl, mferencevic

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1581
2018-09-03 11:23:29 +02:00
..
auth Integrate auth checks into query execution 2018-08-22 11:44:09 +02:00
communication Move add_lcp and add_capnp to cmake/functions.cmake 2018-08-30 16:34:39 +02:00
data_structures Refactor / remove unused lockfree list 2018-07-16 11:43:09 +01:00
database Split database/counters into single node and distributed 2018-08-31 13:52:36 +02:00
distributed Split database/counters into single node and distributed 2018-08-31 13:52:36 +02:00
durability Add magic number to WAL and fix version consistency check 2018-08-29 16:53:10 +02:00
glue Integrate auth checks into query execution 2018-08-22 11:44:09 +02:00
integrations Add kafka benchmark 2018-08-29 16:35:31 +02:00
io Move add_lcp and add_capnp to cmake/functions.cmake 2018-08-30 16:34:39 +02:00
lisp Add default LCP save of primitive types in optional 2018-08-31 14:25:39 +02:00
mvcc Revise user visible error messages 2018-08-29 12:58:15 +02:00
query Use stack allocation for cypher function arguments 2018-09-03 11:23:29 +02:00
requests Implement kafka transform functionality 2018-07-19 12:52:25 +02:00
stats Move add_lcp and add_capnp to cmake/functions.cmake 2018-08-30 16:34:39 +02:00
storage Integrate auth checks into query execution 2018-08-22 11:44:09 +02:00
telemetry Implement kafka transform functionality 2018-07-19 12:52:25 +02:00
transactions Write committed/aborted op to wal 2018-07-05 12:43:18 +02:00
utils Move add_lcp and add_capnp to cmake/functions.cmake 2018-08-30 16:34:39 +02:00
CMakeLists.txt Split database/counters into single node and distributed 2018-08-31 13:52:36 +02:00
config.hpp Make csv_to_snapshot more user friendly 2017-10-26 09:37:56 +02:00
memgraph_bolt.cpp Split database/counters into single node and distributed 2018-08-31 13:52:36 +02:00
memgraph_init.cpp Add kafka benchmark 2018-08-29 16:35:31 +02:00
memgraph_init.hpp Split database/counters into single node and distributed 2018-08-31 13:52:36 +02:00
version.hpp.in Add version.hpp.in and display it on '--version' flag 2017-09-27 09:04:44 +02:00