tarantool / avro-schema

Apache Avro schema tools for Tarantool
57 stars 4 forks source link

Create validate which do not copy a data #111

Open Khatskevich opened 6 years ago

Khatskevich commented 6 years ago

Sometimes one needs only know if the data is valid (copying is not necessary).

Small bench showed that this can increase speed drastically: 150Krps -> 600Krps.

A separate function can be created for the case.

One of the ways to implement and maintain two similar versions of the validate is storing the function body as a string and modifying it before loadstring().