On 05/14/2016 12:10 PM, Andreas Seltenreich wrote:
Konstantin Knizhnik writes:
Latest information from ISP RAS guys: them have made good progress
since February: them have rewritten most of methods of Scan, Aggregate
and Join to LLVM API.
Is their work available somewhere? I'm experimenting in that area as
well, although I'm using libFirm instead of LLVM. I wonder what their
motivation to rewrite backend code in LLVM IR was, since I am following
the approach of keeping the IR around when compiling the vanilla
postgres C code, possibly inlining it during JIT and then doing
optimizations on this IR. That way the logic doesn't have to be
The work is not yet completed but finally it will be definitely put to open
I am going to talk a little bit about this project at PGcon in Ottawa at
lighting talks, although I do not know details of the project myself.
The main difference of their approach comparing with Vitesse DB is that them
implement a way of automatic conversion of PostgreSQL operators to LLVM IR.
So instead of rewritting ~2000 operators manually (a lot of work and errors), them implement converter which transform the code of this operators to ... C++ code producing LLVM IR. So manually them need to rewrite only plan nodes. Them already implemented
most of nodes (SeqScan, Sort, HashJoin,...) which allows to execute all TPC-H queries. Result will be published soon. The larghest advantage is definitely at Q1 - about 4 times. It is worser than Vitesse DB (8 times) and with manually written operators (7
times). The most probable reason causing such performance penalty is overflow checking: in manually written LLVM code it can be done in more efficient way using correspondent assembler instruction than in code automatically converted from standard C.
But ISP RAS guys are going to fix this problem and improve automatic conversion
I include in CC members of ISP RAS team - you can ask them questions directly.
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Sent via pgsql-hackers mailing list (email@example.com)
To make changes to your subscription: