Skip to content

Instantly share code, notes, and snippets.

View abstractlattice.jl
abstract type AbstractLattice; end
function widen; end
"""
struct JLTypeLattice
A singleton type representing the lattice of Julia types, without any inference
extensions.
"""
View gist:95d5faba39523d1cd57ae57f249394da
#include <stdio.h>
#include <signal.h>
#include <setjmp.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <pthread.h>
#include <errno.h>
#include <sys/mman.h>
View index.html
<!DOCTYPE html><html lang="en"><head><meta name="viewport" content="width=device-width"><meta charset="utf-8">
<meta name="pluto-insertion-spot-meta">
<meta name="theme-color" media="(prefers-color-scheme: light)" content="white"><meta name="theme-color" media="(prefers-color-scheme: dark)" content="#2a2928"><meta name="color-scheme" content="light dark"><link rel="icon" type="image/png" sizes="16x16" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.19.9/frontend-dist/favicon-16x16.347d2855.png" integrity="sha384-3qsGeVLdddzV9oIkj3PhXXQX2CZCjOD/CiyrPQOX6InOWw3HAHClrsQhPfX9uRAj" crossorigin="anonymous"><link rel="icon" type="image/png" sizes="32x32" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.19.9/frontend-dist/favicon-32x32.8789add4.png" integrity="sha384-cOe5vSoBIgKNgkUL27p9RpsGVY0uBg9PejLccDy+fR8ZD1Iv5dF1MGHjIZAIZwm6" crossorigin="anonymous"><link rel="icon" type="image/png" sizes="96x96" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.19.9/frontend-dist/favicon-96x96.48689391.png" integrity="sh
View amd_cpuid.patch
commit ec046ffc2b8b9ed6916e402ee580e18da6673709
Author: Keno Fischer <keno@juliacomputing.com>
Date: Sun Jul 3 01:53:53 2022 +0000
WIP: AMD CPUID override
Since e9ea1e7, we've had the ability to turn a userspace `cpuid`
instruction into a SIGSEGV using the ARCH_(GET|SET)_CPUID arch_prctl.
However, this capability is limited to supported hardware, which
currently means Intel CPUs. AMD CPUs do not have a documented facility
@Keno
Keno / IntercatsTalk.pdf
Last active September 7, 2022 11:33
Intercats Talk
View IntercatsTalk.pdf
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gist:eb3a40a9e63ba33c7d49b82a519c04f7
/* -*- Mode: C; tab-width: 8; c-basic-offset: 2; indent-tabs-mode: nil; -*- */
#include "util.h"
pid_t main_thread_tid = 0;
int fds[2];
char zeros[8192];
void sigproc_and_hang(void)
{
View gist:fc4b00960d3954649a42fd1b40f746bc
This file has been truncated, but you can view the full file.
------------------------------------------
7) rr:juli-21726 => rr-21725
------------------------------------------
7) | switch_mm_irqs_off() {
7) 1.624 us | load_new_mm_cr3();
7) 8.897 us | }
------------------------------------------
7) rr-21725 => rr:juli-21726
------------------------------------------
@Keno
Keno / bad.ll
Created March 30, 2022 02:36
bad loop vectorize
View bad.ll
define internal {} addrspace(10)* @japi1_vect_42283({} addrspace(10)** %0, i32 %1) #0 {
top:
%2 = sext i32 %1 to i64
%3 = load atomic {} addrspace(10)* ({} addrspace(10)*, i64)*, {} addrspace(10)* ({} addrspace(10)*, i64)** bitcast (void ()** @jlplt_ijl_alloc_array_1d_10294_got to {} addrspace(10)* ({} addrspace(10)*, i64)**) unordered, align 8
%4 = call {} addrspace(10)* %3({} addrspace(10)* null, i64 0)
%5 = bitcast {} addrspace(10)** %0 to { {} addrspace(10)*, i64 } addrspace(10)**
%6 = load { {} addrspace(10)*, i64 } addrspace(10)*, { {} addrspace(10)*, i64 } addrspace(10)** %5, align 8, !tbaa !0
%7 = bitcast {} addrspace(10)* %4 to { {} addrspace(10)*, i64 } addrspace(13)* addrspace(10)*
%8 = addrspacecast { {} addrspace(10)*, i64 } addrspace(13)* addrspace(10)* %7 to { {} addrspace(10)*, i64 } addrspace(13)* addrspace(11)*
%9 = load { {} addrspace(10)*, i64 } addrspace(13)*, { {} addrspace(10)*, i64 } addrspace(13)* addrspace(11)* %8, align 8, !tbaa !5
View gist:a27add2aed10793b76d340639d0d5bd8
target triple = "x86_64-unknown-linux-gnu"
@SUM.CoreDOT.Tuple5334 = external dso_local global {}*
@jlplt_ijl_alloc_array_1d_10294_got = external dso_local global void ()*
@jl_sysimg_gvars = constant [15411 x i64*] [i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64*
View gist:5587fbfe89bff96c863c8eeb1477defa
module TortureTest
# Scalability parameters - set here to roughly match the real world usecase
# though that use case does more work.
const NFIELDS = 888
const NSET = 387
const NREPS = 40
using Random
using Base.Meta