Skip to content

Instantly share code, notes, and snippets.

View jeffhammond's full-sized avatar

Jeff Hammond jeffhammond

View GitHub Profile
@devinamatthews
devinamatthews / gemm_small.cxx
Created April 11, 2019 20:40
Small matrix multiply (AVX)
#include <cassert>
#include <type_traits>
#include "vec_util.h"
template <int MR, int NR>
struct naive_ukr
{
void operator()(int k,
const double* restrict alpha_,
@lattner
lattner / TaskConcurrencyManifesto.md
Last active September 7, 2026 23:13
Swift Concurrency Manifesto
@jhnns
jhnns / index.json
Last active May 26, 2020 03:10
Most popular web repositories with at least 10.000 stars. Compiled in May 2017 with https://github.com/jhnns/popular-javascript-projects. The list of repo types can be found at https://gist.github.com/jhnns/d233e88b40f5a2993c240847ccef4ee3.
[
{
"name": "freeCodeCamp/freeCodeCamp",
"description": "The https://freeCodeCamp.com open source codebase and curriculum. Learn to code and help nonprofits.",
"stars": 266038,
"type": "other"
},
{
"name": "twbs/bootstrap",
"description": "The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.",
@Brainiarc7
Brainiarc7 / ffmppeg-advanced-playbook-nvenc-and-libav-and-vaapi.md
Last active September 2, 2024 14:37
FFMpeg's playbook: Advanced encoding options with hardware-accelerated acceleration for both NVIDIA NVENC's and Intel's VAAPI-based hardware encoders in both ffmpeg and libav.

FFmpeg and libav's playbook: Advanced encoding options with hardware-based acceleration, NVIDIA's NVENC and Intel's VAAPI-based encoder.

Hello guys,

Continuing from this guide to building ffmpeg and libav with NVENC and VAAPI enabled, this snippet will cover advanced options that you can use with ffmpeg and libav on both NVENC and VAAPI hardware-based encoders.

For ffmpeg:

@Brainiarc7
Brainiarc7 / VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
Last active July 17, 2026 11:54
This gist contains instructions on setting up FFmpeg and Libav to use VAAPI-based hardware accelerated encoding (on supported platforms) for H.264 (and H.265 on supported hardware) video formats.

Using VAAPI's hardware accelerated video encoding on Linux with Intel's hardware on FFmpeg and libav

Hello, brethren :-)

As it turns out, the current version of FFmpeg (version 3.1 released earlier today) and libav (master branch) supports full H.264 and HEVC encode in VAAPI on supported hardware that works reliably well to be termed "production-ready".

@jboner
jboner / latency.txt
Last active September 13, 2026 12:51
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@jarvist
jarvist / com.vim
Last active June 7, 2018 09:51
Vim syntax highlighting file for the NWCHEM electronic structure package input deck (.nw extension), and an even cruder one for Gaussian (.com). Put this in ~/.vim/syntax, and add a suitable loader to ~/.vim/filetype.vim . Used with the Zenburn colour sch
" Vim syntax file
" Language: Gaussian (Electronic Structure Package) Input Files
" Maintainer: Jarvist Moore Frost
" Latest Revision: 27 May 2012
if exists("b:current_syntax")
finish
endif
"Oh Fortran, always ignoring case...