We want to start with respect: we genuinely love C# LINQ.
It’s an elegant piece of engineering, and ZenQL is inspired by LINQ (and Java Streams).
ZenQL was built around the same core idea: expressive query pipelines with strong performance in Go.
Benchmark Snapshot: ZenQL vs LINQ
Model
type ComplexObjectToSearch struct {
Name string
Age int
Id int
Flag bool
}
ZenQL
contracts.SetMaxAllocGuard(25000000) // we had to remove some safety features.
result := From(&items).Where(func(search ComplexObjectToSearch) bool {
return search.Name == "Jane" && search.Flag == false
}).Collect()
result2 := From(&result).Any(func(search ComplexObjectToSearch) bool {
return (search.Name != "Jane") || (search.Flag != false)
}).Assert()
if result2 {
b.Error("result should be false")
}
LINQ
GC.Collect();
GC.WaitForPendingFinalizers();
long memoryBefore = GC.GetTotalMemory(true);
var sw = Stopwatch.StartNew();
var result = items
.Where(search => search.Name == "Jane" && search.Flag == false)
.ToList();
bool result2 = result.Any(search => search.Name != "Jane" || search.Flag != false);
sw.Stop();
Result (in our test setup)
ZenQL: 3236610 ns (~ 3.2 ms )
LINQ: 853073800 ns (~ 853 ms)
Note: Benchmark numbers are environment-dependent.
We recommend reproducing this benchmark on your own machine and workload. As with any benchmark, these results are not definitive—they are intended to provide a practical view of ZenQL’s performance.
Videos and details:
the videos available at our telegram channel for more information. dont forget to star the repo.

Top comments (2)
Nice! I never try snapshot. Did you had any challenges?
Thank you, by "snapshot" I mean just a small comparison between ZenQL and LINQ. It's not related to any specific technology.