Skip to content

Instantly share code, notes, and snippets.

View BillyONeal's full-sized avatar

Billy O'Neal BillyONeal

View GitHub Profile
@BillyONeal
BillyONeal / results.txt
Last active April 14, 2026 00:21
Snapdragon X2 Elite perf comparison
At vcpkg commit 08ae0bd5df38c8c3ab3d479b10796b41cdce5cbd
Strix Halo:
AMD RYZEN AI MAX+ PRO 395 w/ Radeon 8060S
Base speed: 3.00 GHz
Sockets: 1
Cores: 16
Logical processors: 32
Virtualization: Enabled
@BillyONeal
BillyONeal / Results.txt
Created July 25, 2018 21:15
Unicode CVT
D:\build>.\codeset_conversion.exe
07/25/18 14:13:25
Running .\codeset_conversion.exe
Run on (12 X 2904 MHz CPU s)
CPU Caches:
L1 Data 32K (x6)
L1 Instruction 32K (x6)
L2 Unified 262K (x6)
L3 Unified 12582K (x1)
-----------------------------------------------------------------------------
@BillyONeal
BillyONeal / example_use.cpp
Last active November 19, 2022 14:20
Death testing
#include <stddef.h>
#include <string_view>
#include <pmretvals.h>
#include <test_death.hpp>
using namespace std;
int test_case_operator_dereference_value_initalized_iterator() {
string_view::iterator it; // note: for IDL to work correctly, default init and value init are equivalent
@BillyONeal
BillyONeal / gist:04a77c971d87a5b0e3727a42dd9e5dbe
Created October 21, 2022 00:22
Example of how git registries work
Git registry declaration has:
"repository": {
"type": "string",
"description": "The URI or SSH entry to clone from. (as if by `git clone`)"
},
"baseline": {
"description": "The SHA that will be checked out to find default versions for ports from this registry.",
"$ref": "#/definitions/sha1"
},
"reference": {
Thesis: HSR is squeezed on the short end by driving, and on the long end by air travel.
This discussion makes the following assumptions:
• Driving average speed is 83km/hr. (100km/hr speed limit with 10 minutes break each hour)
• HSR average speed is 300km/hr. (ICE Cologne<->Frankfurt’s top speed. There is faster HSR in
the world but I’m also making no allowances for stops. For example, Nozomi Shinkansen Tokyo<->Osaka
is 515km/4 hours or 128km/hr due to 180km/hr top speed but with 17 stops)
• Flight average speed is 700km/hr. (Chicago->Portland is 4.5 hours to do 2823km) Guess that it
takes 3 hours dealing with getting on or off the plane, security theatre, renting a car, etc. B.S.
at either end.
@BillyONeal
BillyONeal / future.cpp
Created March 26, 2021 04:05
future benchmark
#include <stdint.h>
#include <future>
#include <random>
#include <vector>
#include <benchmark/benchmark.h>
static uint_fast32_t long_running_task() {
std::mt19937 gen{std::random_device{}()};
gen.discard(1000);
return gen();
@BillyONeal
BillyONeal / demo.bat
Last active January 13, 2021 01:36
remove FILE_ATTRIBUTE_READONLY demo
:: Run this from a developer command prompt
type removeme.cpp
cl /EHsc /W4 /WX /std:c++17 .\removeme.cpp /Feremoveme
mkdir exampledir
:: owner == BUILTIN\Users
:: group == BUILTIN\Users
:: DACL: (note DACL processed in order)
:: (D;OICI;SD;;;BU) Deny, Object Inherit Container Inherit, DELETE, BUILTIN\Users
:: (D;OICI;0x40;;;WD) Deny, Object Inherit Container Inherit, FILE_DELETE_CHILD, WORLD\Everyone
:: (A;OICI;FA;;;BU) Allow, Object Inherit Container Inherit, FILE_ALL, BUILTIN\Users
@BillyONeal
BillyONeal / id_rsa.pub
Last active December 23, 2020 01:28
SSH Key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfHKdXIqSGCp9xSlpNQ6q/t6pVJF24LMf9EREh9DSOtxTkV93wzem4ylJ1P9ym2faaZXI19woqBoe9685fxNLiesFb2rP7hva5SVkWFaRFsAxLygpYXad5f93qi0nqwXQmbGUgsaxG9+7QxOTq5vrCUDBoTeD20T6E2bDgKyRXtRmumUo1MdzaAQqCgc/kEnk4oaGo90Gr9TIZl7KDmzBox7s7051MClocVmhNaKDLe4hYPBlJEpRu19isordricQSmW+M1fkUVqR19w7J/MKDk5zSMewgNAFULHzJ9fbcDBdFTRYhBbO0GuF7vMSWuB6SXJTEvxMjmObmXDcQrNKz billy@BION-X71
@BillyONeal
BillyONeal / herb_sutter_string.cpp
Created September 15, 2020 00:51
Herb Sutter's basic_string const& vs. && etc. benchmark
#include <assert.h>
#include <stdlib.h>
#include <stddef.h>
#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <chrono>
#include <random>
using namespace std;
@BillyONeal
BillyONeal / hpx_reverse.cpp
Created June 13, 2017 20:20
HPX reverse comparative
#include <hpx/hpx.hpp>
#include <hpx/hpx_init.hpp>
#include <hpx/parallel/algorithms/reverse.hpp>
#include <algorithm>
#include <execution>
#include <functional>
#include <random>
#include <vector>
#include "stopwatch.hpp"