Skip to content

Instantly share code, notes, and snippets.

@HadrienG2
HadrienG2 / High_Performance_Rust.md
Last active March 13, 2024 00:31
Making Rust a perfect fit for high-performance computations

Hello, Rust community!

My name is Hadrien and I am a software performance engineer in a particle physics lab. My daily job is to figure out ways to make scientific software use hardware more efficiently without sacrificing its correctness, primarily by adapting old-ish codebases to the changes that occured in the software and computing landscape since the days where they were designed:

  • CPU clock rates and instruction-level parallelism stopped going up, so optimizing code is now more important.
  • Multi-core CPUs went from an exotic niche to a cheap commodity, so parallelism is not optional anymore.
  • Core counts grow faster than RAM prices go down, so multi-processing is not enough anymore.
  • SIMD vectors become wider and wider, so vectorization is not a gimmick anymore.
@mRB0
mRB0 / gist:740c25fdae3dc0b0ee7a
Created June 2, 2015 17:35
why aren't all objective-C programs written in python?
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from contextlib import contextmanager
import ctypes
import ctypes.util
from ctypes import CFUNCTYPE
objc = ctypes.cdll.LoadLibrary(ctypes.util.find_library('objc'))
@jzrake
jzrake / gnuplot.lua
Created February 2, 2012 02:46
Calling gnuplot from Lua
local function plot(series, tpause)
local gp = io.popen("gnuplot", 'w')
local lines = { }
for k,v in pairs(series) do
table.insert(lines, string.format(" '-' u 1:2 title '%s'", k))
end
gp:write("plot" .. table.concat(lines, ",") .. "\n")
for k,v in pairs(series) do