Skip to content

Instantly share code, notes, and snippets.

@andrew-harter
andrew-harter / README.md
Last active July 3, 2024 10:15
Barebones X11 Smooth Resizing

Barebones X11 Smooth Resizing

This example illustrates how you can use the X11 XSync extension (not to be confused with XSync()) to achieve smooth interactive resizing on the majority of X environments, assuming your program can redraw fast enough.

DISCLAIMER: This example shows only the basic usage of XSync using a single counter, which is the bare minimum required to support smooth resizing.

Basic Rundown:

  1. Indicate that your client is willing to receive sync requests:
  • Add _NET_WM_SYNC_REQUEST to your window's WM_PROTOCOLS.
@skeeto
skeeto / README.md
Last active December 6, 2023 13:51
MSI hash table benchmarks

MSI hash table benchmarks

These are benchmarks demonstrating claims made in [the quick and practical "MSI" hash table][blog]. It pits an MSI hash table set in C using an integer permutation hash and an AES-NI hash, a C++ std::set, and Go map[string]struct{}. Inputs are strings of length 1–8.

My results on an i7-8650U, GCC 12.0.1 (libstdc++), Clang 14.0.6 (libc++):

Time (s) Memory (MiB)