Skip to content

Instantly share code, notes, and snippets.

View ivan-pi's full-sized avatar

Ivan Pribec ivan-pi

View GitHub Profile
@wyphan
wyphan / build.sh
Last active June 13, 2022 16:58
Wil's GCC easy build script. Deprecated in favor of wyphan/gccprefab repo.
\#!/bin/bash
whatscr() { echo "gccprefab - Wil's GCC easy build script"; }
whenscr() { echo "Last updated: Jun 11, 2022 (WYP)"; }
usage() { echo "Usage: $0 [options] configfile"; }
helptext() {
echo "Available options:"
echo " -h, --help Display this help text"
@ivan-pi
ivan-pi / bisect.cxx
Last active August 25, 2022 07:42
Passing a C Function Callback to the Boost Math Toolkit Root Finding Library
// compile with g++ -o bisect.cxx poly.o -I<path/to/boost>
#include <cmath>
#include <iostream>
#include <boost/math/tools/roots.hpp>
// Functor providing termination condition
// Determines convergence in x based on if the relative or absolute tolerance are satisfied
template<class T>
@kconner
kconner / macOS Internals.md
Last active May 6, 2025 05:33
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@snowclipsed
snowclipsed / matmul_FP32.zig
Last active January 15, 2025 19:00
Fast Matrix Multiplication in ZIG in FP32.
const std = @import("std");
// Can also try:
// 8 x 64
// 16 x 64
// Top GFLOPs/s on an Intel® Core™ i7-13620H Processor = 300.9 GFLOPs/s
// Comments were added using Claude.
// To run simply run zig build-exe -O ReleaseFast matmul_FP32.zig, then run the binary ./matmul_FP32
// To test simply run zig test -O ReleaseFast matmul_FP32.zig
// To test performance on a generated binary, run : sudo perf stat -e cache-misses,cache-references,instructions,cycles ./matmul_FP32