Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
9d54013
add GroupIndex function
Apr 30, 2026
925d8fc
add ListGroup function
Apr 30, 2026
571673f
revert -Rpass=loop-vectorize
Apr 30, 2026
3655056
remove useless file
Apr 30, 2026
54d5608
Merge branch 'main' of https://github.com/viktorika/JitFusion into dev
Apr 30, 2026
0d20a39
optimize FilterByBitmap function
Apr 30, 2026
1fb46f0
fix cmake build engine_benchmark
Apr 30, 2026
b43161e
Merge branch 'main' of https://github.com/viktorika/JitFusion into dev
Apr 30, 2026
dbfc16b
add ListLookup, ListCompactPositions, ListCompactIndex, ListGather fu…
May 6, 2026
b24ed2e
revert build
May 6, 2026
a0b2f5e
Merge branch 'main' of https://github.com/viktorika/JitFusion into dev
May 6, 2026
ef4fc22
add Find function
May 6, 2026
03351d9
Merge branch 'main' of https://github.com/viktorika/JitFusion into dev
May 6, 2026
bdd8986
add CrossJoin function
May 6, 2026
5fa713b
Merge branch 'main' of https://github.com/viktorika/JitFusion into dev
May 6, 2026
f8f3618
add ZipConcat
May 6, 2026
bbe0fd4
Merge branch 'main' of https://github.com/viktorika/JitFusion into dev
May 6, 2026
724277b
add Bucketize function
May 6, 2026
144fe19
Merge branch 'main' of https://github.com/viktorika/JitFusion into dev
May 6, 2026
edbd0a0
fix comment
May 6, 2026
f24daec
optimize scope_stack
May 6, 2026
1660ba8
Merge branch 'main' of https://github.com/viktorika/JitFusion into dev
May 7, 2026
13a803d
in function change to exact match
May 7, 2026
15b7617
Merge branch 'main' of https://github.com/viktorika/JitFusion into dev
May 7, 2026
42fc271
const list type and const string type optimize with llvm::constant type
May 7, 2026
9bb275e
remove useless option
May 7, 2026
7b29b76
Merge branch 'main' of https://github.com/viktorika/JitFusion into dev
May 7, 2026
ee61301
engine support save and load
May 7, 2026
55246ac
format
May 7, 2026
45bac1b
format code
May 7, 2026
eba8155
remove useless code
May 7, 2026
e8ad4f5
Merge branch 'main' of https://github.com/viktorika/JitFusion into dev
May 7, 2026
f598d56
fix readme
May 7, 2026
23db0b8
add sign
May 7, 2026
57feb2e
Merge branch 'main' of https://github.com/viktorika/JitFusion into dev
May 7, 2026
e8419de
Merge branch 'main' of https://github.com/viktorika/JitFusion into dev
May 7, 2026
36d5b18
disassembling Athena
May 8, 2026
d010645
Merge branch 'main' of https://github.com/viktorika/JitFusion into dev
May 8, 2026
511a2ff
support skip LoadCompiled check with LoadCompiledOptions
May 8, 2026
061798e
Merge branch 'main' of https://github.com/viktorika/JitFusion into dev
May 8, 2026
a8a7566
update gh_pages
May 8, 2026
640709c
fix deploy
May 8, 2026
0f9e767
fix deploy
May 8, 2026
2b94b66
fix deploy
May 8, 2026
6284728
fix deploy
May 8, 2026
bd798d7
Merge branch 'main' of https://github.com/viktorika/JitFusion into dev
May 8, 2026
4cafbe3
Revert "fix delpoy (#256)" (#257)
viktorika May 8, 2026
fc1f6fd
revert
May 8, 2026
6d25adf
Merge branch 'main' of https://github.com/viktorika/JitFusion into dev
May 8, 2026
2504f11
optimize FilterByBitmap
May 8, 2026
ab7ee55
Merge branch 'main' of https://github.com/viktorika/JitFusion into dev
May 8, 2026
fc5135f
Athena DSL support comment
May 9, 2026
667336d
add sign
May 9, 2026
9528f17
update readme
May 9, 2026
ee383a4
remove useless comment
May 9, 2026
9818e75
Merge branch 'main' of https://github.com/viktorika/JitFusion into dev
May 9, 2026
678a48a
update version to 1.3.0
May 9, 2026
a299a53
Merge branch 'main' of https://github.com/viktorika/JitFusion into dev
May 9, 2026
21050a6
optimize ListLookupIndex
May 11, 2026
19e7ffd
Merge branch 'main' of https://github.com/viktorika/JitFusion into dev
May 11, 2026
35c752f
remove transfer exec_ctx args
May 11, 2026
c88793f
test and benchmark remove exec_ctx node
May 11, 2026
d08b221
README update exec_ctx description
May 11, 2026
387639d
update remove exec_ctx use
May 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ I considered how many types of nodes are needed to represent a function in the e

EntryArgumentNode: A node used to obtain the entry argument variables of a function.

ExecContextNode: A node used to obtain the context variables of the execution engine.
ExecContextNode: A node used to obtain the context variables of the execution engine. (Legacy — kept for backward compatibility; new code does not need to construct it explicitly because codegen auto-injects exec_ctx for functions registered via `RegisterReadOnlyCFuncWithExecCtx`.)

ConstValueNode: Scalar constant node.

Expand Down Expand Up @@ -309,9 +309,9 @@ The library is designed around a "compile once, execute from many threads" patte
Recommended pattern for parallel execution: one shared `ExecEngine` plus one `ExecContext` per worker thread.

# Attention
1. If you need to allocate memory that you cannot manage yourself and require the execution engine to manage it for you, you need to use the ExecContextNode. The ExecContext structure corresponding to ExecContextNode contains an arena. By using it to allocate memory, the memory will be automatically released when the execution is complete.
1. If you need to allocate memory that you cannot manage yourself and require the execution engine to manage it for you, register your C function with `RegisterReadOnlyCFuncWithExecCtx`. The function should accept a trailing `void* ctx` parameter (which is the `ExecContext` pointer); the AST does **not** pass it explicitly — codegen automatically forwards the per-execution context. The `ExecContext` carries an arena, so memory allocated through `exec_ctx->arena` is freed automatically when execution ends.

You can refer to test/exec_context_node_test.cc for more details. For example:
For example:

```c++
using namespace jitfusion;
Expand All @@ -330,13 +330,14 @@ U32ListStruct CreateU32List(void* ctx) {
int main() {
std::unique_ptr<FunctionRegistry> func_registry;
FunctionRegistryFactory::CreateFunctionRegistry(&func_registry);
FunctionSignature sign("create_u32_list", {ValueType::kPtr}, ValueType::kU32List);
func_registry->RegisterReadOnlyCFunc(sign, reinterpret_cast<void*>(CreateU32List));

auto args_node = std::unique_ptr<ExecNode>(new ExecContextNode);
std::vector<std::unique_ptr<ExecNode>> create_func_args;
create_func_args.emplace_back(std::move(args_node));
auto create_func_node = std::unique_ptr<ExecNode>(new FunctionNode("create_u32_list", std::move(create_func_args)));
// User-visible signature has no trailing kPtr; the trailing exec_ctx is
// injected by codegen at every call site.
FunctionSignature sign("create_u32_list", {}, ValueType::kU32List);
func_registry->RegisterReadOnlyCFuncWithExecCtx(sign, reinterpret_cast<void*>(CreateU32List));

// No ExecContextNode in the AST — codegen wires exec_ctx through.
auto create_func_node = std::unique_ptr<ExecNode>(
new FunctionNode("create_u32_list", std::vector<std::unique_ptr<ExecNode>>{}));

ExecEngine exec_engine;
auto st = exec_engine.Compile(create_func_node, func_registry);
Expand Down
2 changes: 1 addition & 1 deletion athena/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ when condition1 {

Note: Variables modified inside `when` branches must maintain the same type as their original declaration. Nested `when` blocks are also supported.

* 5.You can obtain the input parameter pointer through the entry_arg name, access the ExecContext via exec_ctx and obtain the output parameter pointer through the output name.
* 5.You can obtain the input parameter pointer through the `entry_arg` name and the output parameter pointer through the `output` name. (The `exec_ctx` identifier is also still recognised as a legacy keyword that materialises the `ExecContext` pointer; new code does not need to pass it because functions registered via `RegisterReadOnlyCFuncWithExecCtx` get it injected by codegen.)

* 6.Comments are supported in two C/C++ styles:
* Line comments start with `//` and extend to the end of the line.
Expand Down
6 changes: 3 additions & 3 deletions athena/test/const_value_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ TEST(ConstValueTest, ListMergeOptimizeTest) {
std::string code = R"(
a = [1, 2, 3];
b = [1, 2, 3];
c = ListAdd(a, b, exec_ctx);
d = ListAdd(b, a, exec_ctx);
e = ListAdd(c, d, exec_ctx);
c = ListAdd(a, b);
d = ListAdd(b, a);
e = ListAdd(c, d);
)";
ASSERT_TRUE(athena.Compile(code, func_registry).ok());
RetType ret;
Expand Down
6 changes: 3 additions & 3 deletions athena/test/exec_error_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ TEST(ExecErrorTest, SingleExpressionRuntimeError) {
std::string code = R"(
a = [1, 2, 3];
b = [4, 5];
r = ListAdd(a, b, exec_ctx);
r = ListAdd(a, b);
)";
ASSERT_TRUE(athena.Compile(code, func_registry).ok());
RetType ret;
Expand All @@ -43,7 +43,7 @@ TEST(ExecErrorTest, WithExecContextRuntimeError) {
std::string code = R"(
a = [1, 2, 3];
b = [4, 5];
r = ListAdd(a, b, exec_ctx);
r = ListAdd(a, b);
)";
ASSERT_TRUE(athena.Compile(code, func_registry).ok());
ExecContext exec_ctx(4096);
Expand Down Expand Up @@ -74,7 +74,7 @@ TEST(ExecErrorTest, BatchExecutePartialFailure) {
store(output, 0, r);
)";
std::string code2 = R"(
r = ListAdd([1, 2, 3], [4, 5], exec_ctx);
r = ListAdd([1, 2, 3], [4, 5]);
)";
std::string code3 = R"(
a = load(entry_arg, 0);
Expand Down
20 changes: 10 additions & 10 deletions athena/test/pipeline_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ TEST(FilterTest, Test1) {
EXPECT_TRUE(func_registry->RegisterReadOnlyCFunc(sign, reinterpret_cast<void*>(LoadI32List)).ok());
std::string code = R"(
a = load(entry_arg, 0);
b = GenLargeBitmap(a, 3, exec_ctx);
FilterByBitmap(a, b, exec_ctx);
b = GenLargeBitmap(a, 3);
FilterByBitmap(a, b);
)";
ASSERT_TRUE(athena.Compile(code, func_registry).ok());
RetType ret;
Expand All @@ -101,8 +101,8 @@ TEST(FilterTest, Test2) {
std::string code = R"(
a = load(entry_arg, 0);
b = load(entry_arg, 1);
c = GenLargeBitmap(a, b, exec_ctx);
FilterByBitmap(a, c, exec_ctx);
c = GenLargeBitmap(a, b);
FilterByBitmap(a, c);
)";
ASSERT_TRUE(athena.Compile(code, func_registry).ok());
RetType ret;
Expand All @@ -122,9 +122,9 @@ TEST(CustomPassTest, CommutativeCallCanonicalizerPass1) {
std::string code = R"(
a = load(entry_arg, 0);
b = load(entry_arg, 1);
c = ListAdd(a, b, exec_ctx);
d = ListAdd(b, a, exec_ctx);
e = ListAdd(c, d, exec_ctx);
c = ListAdd(a, b);
d = ListAdd(b, a);
e = ListAdd(c, d);
)";
ASSERT_TRUE(athena.Compile(code, func_registry).ok());
RetType ret;
Expand All @@ -143,9 +143,9 @@ TEST(CustomPassTest, CommutativeCallCanonicalizerPass2) {
std::string code = R"(
a = [1, 2, 3];
b = [4, 5, 6];
c = ListAdd(a, b, exec_ctx);
d = ListAdd(b, a, exec_ctx);
e = ListAdd(c, d, exec_ctx);
c = ListAdd(a, b);
d = ListAdd(b, a);
e = ListAdd(c, d);
)";
ASSERT_TRUE(athena.Compile(code, func_registry).ok());
RetType ret;
Expand Down
2 changes: 1 addition & 1 deletion athena/test/ref_node_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ TEST(RefNodeTest, RefNodeWithListOperations) {
std::string code = R"(
a = load(entry_arg, 0);
b = load(entry_arg, 1);
c = ListAdd(a, b, exec_ctx);
c = ListAdd(a, b);
d = Len(c);
e = Len(a) + Len(b);
store(output, 0, CastF32(d));
Expand Down
24 changes: 9 additions & 15 deletions benchmark/bench_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ inline std::unique_ptr<ExecNode> MakeListUnaryCall(const std::string& func_name,
// Convenience alias kept for readability.
inline std::unique_ptr<ExecNode> MakeListSumExpr(int list_len) { return MakeListUnaryCall("Sum", list_len); }

// Build `func_name(list, exec_ctx)` — one-arg list kernels that require an
// ExecContext pointer (arithmetic/basic kernels that allocate output lists).
// Build `func_name(list)` — one-arg list kernels that allocate output lists.
// (The C-level kernel still takes a trailing exec_ctx pointer; codegen now
// auto-injects it, so the user-visible AST has no ctx node.)
inline std::unique_ptr<ExecNode> MakeListUnaryCtxCall(const std::string& func_name, int list_len) {
std::vector<int64_t> values;
values.reserve(list_len);
Expand All @@ -136,11 +137,10 @@ inline std::unique_ptr<ExecNode> MakeListUnaryCtxCall(const std::string& func_na
}
std::vector<std::unique_ptr<ExecNode>> args;
args.emplace_back(new ConstantListValueNode(std::move(values)));
args.emplace_back(new jitfusion::ExecContextNode());
return std::unique_ptr<ExecNode>(new FunctionNode(func_name, std::move(args)));
}

// Build `func_name(list<f64>, exec_ctx)` — unary kernels that only accept float lists
// Build `func_name(list<f64>)` — unary kernels that only accept float lists
// (ListCeil, ListFloor, ListRound).
inline std::unique_ptr<ExecNode> MakeListUnaryCtxCallF64(const std::string& func_name, int list_len) {
std::vector<double> values;
Expand All @@ -150,11 +150,10 @@ inline std::unique_ptr<ExecNode> MakeListUnaryCtxCallF64(const std::string& func
}
std::vector<std::unique_ptr<ExecNode>> args;
args.emplace_back(new ConstantListValueNode(std::move(values)));
args.emplace_back(new jitfusion::ExecContextNode());
return std::unique_ptr<ExecNode>(new FunctionNode(func_name, std::move(args)));
}

// Build `func_name(list<int64>, scalar_int, exec_ctx)` — list-scalar broadcast.
// Build `func_name(list<int64>, scalar_int)` — list-scalar broadcast.
inline std::unique_ptr<ExecNode> MakeListScalarCtxCall(const std::string& func_name, int list_len, int64_t scalar_val) {
std::vector<int64_t> values;
values.reserve(list_len);
Expand All @@ -164,11 +163,10 @@ inline std::unique_ptr<ExecNode> MakeListScalarCtxCall(const std::string& func_n
std::vector<std::unique_ptr<ExecNode>> args;
args.emplace_back(new ConstantListValueNode(std::move(values)));
args.emplace_back(new ConstantValueNode(scalar_val));
args.emplace_back(new jitfusion::ExecContextNode());
return std::unique_ptr<ExecNode>(new FunctionNode(func_name, std::move(args)));
}

// Build `func_name(list<uint64>, scalar<uint64>, exec_ctx)` — bitwise list-scalar.
// Build `func_name(list<uint64>, scalar<uint64>)` — bitwise list-scalar.
// Bitwise kernels are only registered for unsigned integer types.
inline std::unique_ptr<ExecNode> MakeListScalarCtxCallU64(const std::string& func_name, int list_len,
uint64_t scalar_val) {
Expand All @@ -180,11 +178,10 @@ inline std::unique_ptr<ExecNode> MakeListScalarCtxCallU64(const std::string& fun
std::vector<std::unique_ptr<ExecNode>> args;
args.emplace_back(new ConstantListValueNode(std::move(values)));
args.emplace_back(new ConstantValueNode(scalar_val));
args.emplace_back(new jitfusion::ExecContextNode());
return std::unique_ptr<ExecNode>(new FunctionNode(func_name, std::move(args)));
}

// Build `func_name(list<uint64>, list<uint64>, exec_ctx)` — bitwise list-list.
// Build `func_name(list<uint64>, list<uint64>)` — bitwise list-list.
inline std::unique_ptr<ExecNode> MakeListListCtxCallU64(const std::string& func_name, int list_len) {
std::vector<uint64_t> lhs;
std::vector<uint64_t> rhs;
Expand All @@ -197,11 +194,10 @@ inline std::unique_ptr<ExecNode> MakeListListCtxCallU64(const std::string& func_
std::vector<std::unique_ptr<ExecNode>> args;
args.emplace_back(new ConstantListValueNode(std::move(lhs)));
args.emplace_back(new ConstantListValueNode(std::move(rhs)));
args.emplace_back(new jitfusion::ExecContextNode());
return std::unique_ptr<ExecNode>(new FunctionNode(func_name, std::move(args)));
}

// Build `func_name(list<int64>, list<int64>, exec_ctx)` — element-wise list-list.
// Build `func_name(list<int64>, list<int64>)` — element-wise list-list.
inline std::unique_ptr<ExecNode> MakeListListCtxCall(const std::string& func_name, int list_len) {
std::vector<int64_t> lhs;
std::vector<int64_t> rhs;
Expand All @@ -214,11 +210,10 @@ inline std::unique_ptr<ExecNode> MakeListListCtxCall(const std::string& func_nam
std::vector<std::unique_ptr<ExecNode>> args;
args.emplace_back(new ConstantListValueNode(std::move(lhs)));
args.emplace_back(new ConstantListValueNode(std::move(rhs)));
args.emplace_back(new jitfusion::ExecContextNode());
return std::unique_ptr<ExecNode>(new FunctionNode(func_name, std::move(args)));
}

// Build `func_name(list<int64>, scalar, scalar, exec_ctx)` — the IfEqual /
// Build `func_name(list<int64>, scalar, scalar)` — the IfEqual /
// IfLess / etc. family: "for each element, if cond(elem, pivot) pick a else b".
inline std::unique_ptr<ExecNode> MakeListIfSelectCall(const std::string& func_name, int list_len) {
std::vector<int64_t> values;
Expand All @@ -230,7 +225,6 @@ inline std::unique_ptr<ExecNode> MakeListIfSelectCall(const std::string& func_na
args.emplace_back(new ConstantListValueNode(std::move(values)));
args.emplace_back(new ConstantValueNode(static_cast<int64_t>(list_len / 2)));
args.emplace_back(new ConstantValueNode(static_cast<int64_t>(-1)));
args.emplace_back(new jitfusion::ExecContextNode());
return std::unique_ptr<ExecNode>(new FunctionNode(func_name, std::move(args)));
}

Expand Down
16 changes: 7 additions & 9 deletions benchmark/bench_list_agg.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
* @Author: victorika
* @Date: 2026-04-30 16:07:33
* @Last Modified by: victorika
* @Last Modified time: 2026-04-30 16:07:33
* @Last Modified time: 2026-05-11 16:58:15
*/
// C. List aggregation + C-group. See bench_compile.cc for the split overview.

#include "benchmark/bench_common.h"

namespace {

using ::jitfusion::bench::CompileOrDie;
using ::jitfusion::bench::MakeListUnaryCall;
using ::jitfusion::bench::MakeRegistry;
using ::jitfusion::ConstantListValueNode;
using ::jitfusion::ConstantValueNode;
using ::jitfusion::ExecContext;
using ::jitfusion::ExecNode;
using ::jitfusion::FunctionNode;
using ::jitfusion::RetType;
using ::jitfusion::bench::CompileOrDie;
using ::jitfusion::bench::MakeListUnaryCall;
using ::jitfusion::bench::MakeRegistry;

// =============================================================================
// C. List aggregation — kernel cost vs. list length
Expand Down Expand Up @@ -237,12 +237,11 @@ std::unique_ptr<ExecNode> MakeGroupKeysList(int len, int distinct) {
return std::unique_ptr<ExecNode>(new ConstantListValueNode(std::move(values)));
}

// Build `GroupIndex(keys_list, exec_ctx)` — the only non-sugar group node in
// the family; its kernel is the 2-arg form.
// Build `GroupIndex(keys_list)` — the only non-sugar group node in
// the family.
std::unique_ptr<ExecNode> MakeGroupIndexNode(int len, int distinct) {
std::vector<std::unique_ptr<ExecNode>> args;
args.emplace_back(MakeGroupKeysList(len, distinct));
args.emplace_back(new jitfusion::ExecContextNode());
return std::unique_ptr<ExecNode>(new FunctionNode("GroupIndex", std::move(args)));
}

Expand Down Expand Up @@ -288,15 +287,14 @@ void BM_Execute_GroupCount(benchmark::State& state) {
}
BENCHMARK(BM_Execute_GroupCount)->Args({4096, 16})->Args({4096, 256})->Args({4096, 4096});

// Helper: build the sugar-form call `func_name(keys_or_values, GroupIndex(...), exec_ctx)`.
// Helper: build the sugar-form call `func_name(keys_or_values, GroupIndex(...))`.
// The keys list drives GroupIndex; the same list is also fed as values/keys
// to the aggregate under test. That's fine because all aggregates accept
// integer lists and we measure compute time, not numerical content.
std::unique_ptr<ExecNode> MakeGroupSugarCall(const std::string& func_name, int len, int distinct) {
std::vector<std::unique_ptr<ExecNode>> args;
args.emplace_back(MakeGroupKeysList(len, distinct));
args.emplace_back(MakeGroupIndexNode(len, distinct));
args.emplace_back(new jitfusion::ExecContextNode());
return std::unique_ptr<ExecNode>(new FunctionNode(func_name, std::move(args)));
}

Expand Down
26 changes: 13 additions & 13 deletions benchmark/bench_list_basic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: victorika
* @Date: 2026-04-30 16:07:33
* @Last Modified by: victorika
* @Last Modified time: 2026-04-30 16:07:33
* @Last Modified time: 2026-05-11 16:58:35
*/
// G. List basic (shape manipulation) + H. List element-wise unary.
// See bench_compile.cc for the split overview.
Expand All @@ -11,18 +11,18 @@

namespace {

using ::jitfusion::bench::CompileOrDie;
using ::jitfusion::bench::MakeListListCtxCall;
using ::jitfusion::bench::MakeListUnaryCall;
using ::jitfusion::bench::MakeListUnaryCtxCall;
using ::jitfusion::bench::MakeListUnaryCtxCallF64;
using ::jitfusion::bench::MakeRegistry;
using ::jitfusion::ConstantListValueNode;
using ::jitfusion::ConstantValueNode;
using ::jitfusion::ExecContext;
using ::jitfusion::ExecNode;
using ::jitfusion::FunctionNode;
using ::jitfusion::RetType;
using ::jitfusion::bench::CompileOrDie;
using ::jitfusion::bench::MakeListListCtxCall;
using ::jitfusion::bench::MakeListUnaryCall;
using ::jitfusion::bench::MakeListUnaryCtxCall;
using ::jitfusion::bench::MakeListUnaryCtxCallF64;
using ::jitfusion::bench::MakeRegistry;

// =============================================================================
// G. List basic — shape-manipulation kernels
Expand Down Expand Up @@ -163,7 +163,7 @@ void BM_Execute_ListMurmurHash3X8632(benchmark::State& state) {
}
BENCHMARK(BM_Execute_ListMurmurHash3X8632)->Arg(256)->Arg(4096);

// ListConcat(listA, listB, ctx).
// ListConcat(listA, listB).
void BM_Execute_ListConcat(benchmark::State& state) {
const int len = static_cast<int>(state.range(0));
auto reg = MakeRegistry();
Expand All @@ -181,7 +181,7 @@ void BM_Execute_ListConcat(benchmark::State& state) {
}
BENCHMARK(BM_Execute_ListConcat)->Arg(256)->Arg(4096);

// CrossJoin(stringlist a, stringlist b, string sep, ctx) — produces a
// CrossJoin(stringlist a, stringlist b, string sep) — produces a
// length-(|a| * |b|) stringlist of "a[i] + sep + b[j]". Output size is
// quadratic in the input length, so we sweep the per-side length from 16..256
// (yielding 256..65536 output elements) instead of the usual 256/4096 sweep
Expand All @@ -201,7 +201,7 @@ void BM_Execute_CrossJoin(benchmark::State& state) {
args.emplace_back(new ConstantListValueNode(std::move(a)));
args.emplace_back(new ConstantListValueNode(std::move(b)));
args.emplace_back(new ConstantValueNode(std::string("_")));
args.emplace_back(new jitfusion::ExecContextNode());

std::unique_ptr<ExecNode> node(new FunctionNode("CrossJoin", std::move(args)));

auto engine = CompileOrDie(std::move(node), reg);
Expand All @@ -218,7 +218,7 @@ void BM_Execute_CrossJoin(benchmark::State& state) {
}
BENCHMARK(BM_Execute_CrossJoin)->Arg(16)->Arg(64)->Arg(256);

// ZipConcat(stringlist a, stringlist b, string sep, ctx) — per-position
// ZipConcat(stringlist a, stringlist b, string sep) — per-position
// concatenation, output length equals |a| (== |b|). Linear cost in input
// length, so it shares the standard 256/4096 sweep with the other linear
// list kernels.
Expand All @@ -237,7 +237,7 @@ void BM_Execute_ZipConcat(benchmark::State& state) {
args.emplace_back(new ConstantListValueNode(std::move(a)));
args.emplace_back(new ConstantListValueNode(std::move(b)));
args.emplace_back(new ConstantValueNode(std::string(":")));
args.emplace_back(new jitfusion::ExecContextNode());

std::unique_ptr<ExecNode> node(new FunctionNode("ZipConcat", std::move(args)));

auto engine = CompileOrDie(std::move(node), reg);
Expand Down Expand Up @@ -284,7 +284,7 @@ void BM_Execute_ListIn(benchmark::State& state) {
BENCHMARK(BM_Execute_ListIn)->Arg(256)->Arg(4096);

// =============================================================================
// H. List element-wise unary (func(list, ctx) -> list)
// H. List element-wise unary (func(list) -> list)
// =============================================================================

#define JITFUSION_DEFINE_LIST_UNARY_BM(NAME) \
Expand Down
Loading
Loading