使用jit编译器没有性能提升

li9yvcax  于 2021-07-15  发布在  ClickHouse
关注(0)|答案(0)|浏览(226)

我目前正在做一些关于jit编译器的基准测试,以检查在禁用jit的查询、启用jit的查询和直接在代码库中的自定义实现之间,我们可以期望有多大的性能提高 clickhouse-server .
作为一个基本测试,我创建了一个表,其中包含10个相同类型的不同列,只做简单的算术运算。此表包含1000万行。
这个公式可以表示为 a / a' + b / b' + c / c' + d / d' + e / e' .
虽然我们可以看到使用自定义clickhouse函数可以大大提高性能,但是使用jit编译器却无法看到显著的性能提高,因为jit编译器可能不会创建中间列来执行此类操作。
我用来 clickhouse performance-test ```

Without JIT VS JIT VS custom implementation

<type>loop</type>

<stop_conditions>
    <all_of>
        <iterations>10</iterations>
    </all_of>
</stop_conditions>

<create_query>CREATE TABLE test (a UInt64, a_ UInt64, b UInt64, b_ UInt64, c UInt64, c_ UInt64, d UInt64, d_ UInt64, e UInt64, e_ UInt64) Engine = Memory</create_query>

<fill_query>INSERT INTO test SELECT number, number, number, number, number, number, number, number, number, number from system.numbers LIMIT 10000000</fill_query>

<query>
    SELECT
        a / a_ + b / b_ + c / c_ + d / d_ + e / e_
    FROM
        test
    SETTINGS
        compile_expressions = 0;
</query>

<query>
    SELECT
        a / a_ + b / b_ + c / c_ + d / d_ + e / e_
    FROM
       test
    SETTINGS
        compile_expressions = 1;
</query>
<query>
    SELECT custom_implementation(a, a_, b, b_, c, c_, d, d_, e, e_) FROM test
</query>

<drop_query>DROP TABLE IF EXISTS test</drop_query>

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题