Skip to content

Instantly share code, notes, and snippets.

View Luiz-Monad's full-sized avatar
💭
computing

Luiz Luiz-Monad

💭
computing
View GitHub Profile
@Luiz-Monad
Luiz-Monad / Download_Worry_Dream_References.linq
Created August 16, 2022 21:48 — forked from secretGeek/Download_Worry_Dream_References.linq
LinqPad script that downloads all PDFs/etc from Bret Victors worry dream refs page.
void Main()
{
// LinqPad script that downloads all PDFs/etc from Bret Victors worry dream refs page.
var targetPath = @"PATH_TO_WHERE_YOU_KEEP_YOUR_EBOOK\eBooks";
//These filenames were extracted from http://worrydream.com/refs/ -- using NimbleText.
//(TODO: Use regex or html agility pack to find them programmatically)
var refs = new string[] {
"Hamming-TheArtOfDoingScienceAndEngineering.pdf",
"Licklider-IntergalacticNetwork.pdf",
@Luiz-Monad
Luiz-Monad / cxx-function-object-performance-test.cpp
Last active April 18, 2026 22:24 — forked from christianparpart/cxx-function-object-performance-test.cpp
"Mini Benchmark" on showcasing the performance overhead of different function-pointer techniques, as provided by C++11.Keep in mind, these are *bare* calls to functions that do only one thing, atomically incrementing its counter; By checking the generated assembler output you may find out, that a bare C-function pointer loop is compiled into 3 C…
// clang++ -o tests/perftest-fncb tests/perftest-fncb.cpp -std=c++11 -O3 -march=native -mtune=native
#include <algorithm>
#include <atomic>
#include <chrono>
#include <functional>
#include <stdio.h>
#include <string>
#include <thread>
#include <vector>