Re: Just-in-time compiling things

Поиск
Список
Период
Сортировка
От Konstantin Knizhnik
Тема Re: Just-in-time compiling things
Дата
Msg-id 573722B1.2020405@postgrespro.ru
обсуждение исходный текст
Ответ на Just-in-time compiling things (was: asynchronous and vectorized execution)  (Andreas Seltenreich <seltenreich@gmx.de>)
Список pgsql-hackers
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
> duplicated.

The work is not yet completed but finally it will be definitely put to open source.
I am going to talk a little bit about this project at PGcon in Ottawa at lighting talks, although I do not know details
ofthe project myself.
 
The main difference of their approach comparing with Vitesse DB is that them implement a way of automatic conversion of
PostgreSQLoperators to LLVM IR.
 
So instead of rewritting ~2000 operators manually (a lot of work and errors), them implement converter which transform
thecode of this operators to ... C++ code producing LLVM IR. So manually them need to rewrite only plan nodes. Them
alreadyimplemented 
 
most of nodes (SeqScan, Sort, HashJoin,...) which allows to execute all TPC-H queries. Result will be published soon.
Thelarghest advantage is definitely at Q1 - about 4 times. It is worser than Vitesse DB (8 times) and with manually
writtenoperators (7 
 
times). The most probable reason causing such performance penalty is overflow checking: in manually written LLVM code
itcan be done in more efficient way using correspondent assembler instruction than in code automatically converted from
standardC.
 
But ISP RAS guys are going to fix this problem and improve automatic conversion quality.

I include in CC members of ISP RAS team - you can ask them questions directly.




> regrads
> Andreas


-- 
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Christoph Berg
Дата:
Сообщение: Re: 10.0
Следующее
От: Ashutosh Sharma
Дата:
Сообщение: Re: Perf Benchmarking and regression.