Skip to content

Instantly share code, notes, and snippets.

View fsaintjacques's full-sized avatar
🎯
Focusing

François Saint-Jacques fsaintjacques

🎯
Focusing
  • Montréal, Québec
View GitHub Profile
@fsaintjacques
fsaintjacques / filter.ll
Created February 13, 2020 15:24
gandiva filter
; ModuleID = 'codegen'
source_filename = "codegen"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@llvm.global_ctors = appending global [0 x { i32, void ()*, i8* }] zeroinitializer
@_ZN5arrow7BitUtilL8kBitmaskE = internal unnamed_addr constant [8 x i8] c"\01\02\04\08\10 @\80", align 1
; Function Attrs: norecurse nounwind
define i32 @expr_0_0(i64* nocapture readonly %args, i64* nocapture readonly %arg_addr_offsets, i64* nocapture readnone %local_bitmaps, i16* nocapture readnone %selection_vector, i64 %context_ptr, i64 %nrecords) local_unnamed_addr #0 {
@fsaintjacques
fsaintjacques / aliases.txt
Created November 21, 2019 13:23
Arrow type aliases
$ ag "^using [a-zA-Z]+(Ptr|Vector|Iterator)" cpp/src [31/1853]
cpp/src/gandiva/function_holder.h
33:using FunctionHolderPtr = std::shared_ptr<FunctionHolder>;
cpp/src/gandiva/arrow.h
33:using ArrayPtr = std::shared_ptr<arrow::Array>;
35:using DataTypePtr = std::shared_ptr<arrow::DataType>;
36:using DataTypeVector = std::vector<DataTypePtr>;
41:using FieldPtr = std::shared_ptr<arrow::Field>;
42:using FieldVector = std::vector<FieldPtr>;
#!/usr/bin/env bash
set -eu
PWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
SRC_DIR=$(realpath "${PWD}/..")
CXX_SRC=${SRC_DIR}/cpp
# The following can be set
: "${CMAKE:=cmake}"
template <typename ArrowType, CompareOperator Op>
static inline std::shared_ptr<FilterFunction> MakeCompareFunctionTypeOp(
FunctionContext* ctx) {
return std::static_pointer_cast<FilterFunction>(
std::make_shared<CompareFunction<ArrowType, Op>>(ctx));
}
template <typename ArrowType>
static inline std::shared_ptr<FilterFunction> MakeCompareFilterFunctionType(
FunctionContext* ctx, struct CompareOptions options) {
@fsaintjacques
fsaintjacques / perf.report
Last active October 13, 2021 04:41
arrow-flight-benchmark
# To display the perf.data header info, please use --header/--header-only options.
#
#
# Total Lost Samples: 0
#
# Samples: 94K of event 'cycles:ppp'
# Event count (approx.): 34738352402
#
# Overhead Command Shared Object Symbol
# ........ ............... ......................... ..........................................................................................................................................................................................................
==============
01
20:52:48 up 3 days, 8:07, 8 users, load average: 0.38, 0.53, 0.30
Linux 01 4.13.0-16-generic #19-Ubuntu SMP Wed Oct 11 18:35:14 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
16 Intel(R) Core(TM) i7-7820X CPU @ 3.60GHz
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 intel_pt mba tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat
#include <stdbool.h>
#include <stdint.h>
/* The state of a healthcheck. */
enum sk_health_state {
/* The check is in an unknown state, probably due to an internal error. */
SK_HEALTH_STATE_UNKNOWN = 0,
/* The check is healthy. */
SK_HEALTH_STATE_OK = 1,
/* The check is healthy but will soon reach unhealthy level; preventive
const std = @import("std");
const io = std.io;
pub fn testFn() -> void {
wat
}
pub fn main(args: [][]u8) -> %void {
%%io.stderr.printf("\n");
}
typedef simd_t __m256i;
// specialized for every container type
simd_t container_to_chunk(const container_t * array, size_t chunk_position);
// intersecting any 2 types of containers
container_intersection(const container *a, const container *b, bitset *dst) {
// promote dst to bitset
for (i = 0; i < N_CHUNKS; ++i) {
int bitset_container_or(const bitset_container_t *bitset1,
const bitset_container_t *bitset2,
bitset_container_t *bitsetout) {
#ifdef USEAVX
- bitset_container_or_nocard(bitset1, bitset2, bitsetout);
- bitsetout->cardinality = bitset_container_compute_cardinality(bitsetout);
+ const uint64_t *a1 = bitset1->array;
+ const uint64_t *a2 = bitset2->array;
+ uint64_t *ao = bitsetout->array;
+ int sum = 0;