Replies: 3 comments
-
Have you measured whether a faster integer-to-string conversion would make any difference in real-world performance? Our assumption was that any database operation that includes a round-trip to the database server will dwarf any speed-up of local query preparation to the point of rendering the speed-up mostly irrelevant. |
Beta Was this translation helpful? Give feedback.
-
I haven't measured this yet, but I'm curious to do so. However from my internal tests it seems that the binary format (proposed in #18) can make a difference of up to 20% when storing values in a local postgreSQL database via libpq. So its at least possible that the string-conversion has a share in this speedup. I'm far from an expert in databases so please take these numbers with a grain of salt: I'm using a vanilla non-optimized postgresSQL 11 installation for Linux that I build myself from source. I connect non-encrypted via local network port. And the numbers are measured without batch-insert, storing numerical value by numerical value with prepared statements. |
Beta Was this translation helpful? Give feedback.
-
I'd first like to explore #18 first as it seems to offer a much more direct way of handling numeric arguments. |
Beta Was this translation helpful? Give feedback.
-
I've seen that taopq uses
vsnprintf
internally to convert numerical arguments to strings. I'm wondering how much the number to string conversion can affect performance. Generally there are nowadays very fast conversion libraries like https://github.com/fmtlib/fmt that can achieve a multitude of the performance of the default implementations.Do you know how much of a performance gain may be achieved by faster conversion? And would it be thinkable to add (optional) support for such a faster library like fmt?
Beta Was this translation helpful? Give feedback.
All reactions