mirror of
https://github.com/MariaDB/server.git
synced 2025-11-08 00:28:29 +03:00
As an additional improvement, let's store string representations of
the numbers using an array uint16[256] instead of char[512].
This allows to use int2store(), which copies two bytes at a time on x86,
instead of copying the two bytes with digits one-by-one.
This change gives an additional 7% to 26% query time reduce for:
SELECT BENCHMARK(10*1000*1000,CONCAT(TIME'10:20:30'));
SELECT BENCHMARK(10*1000*1000,CONCAT(TIME'10:20:30.123456'));
SELECT BENCHMARK(10*1000*1000,CONCAT(DATE'2001-01-01'));
SELECT BENCHMARK(10*1000*1000,CONCAT(TIMESTAMP'2001-01-01 10:20:30'));
SELECT BENCHMARK(10*1000*1000,CONCAT(TIMESTAMP'2001-01-01 10:20:30.123456'));
The total time reduce (part1 + part2) is now between 15% to 38%
for these queries.
62 KiB
62 KiB