Usually, located at /usr/local/cuda/bin
$ nvprof python train_mnist.py
I prefer to use --print-gpu-trace.
--- | |
name: john-carmack-synthesizer | |
description: Use this agent when you need to cut through complexity and synthesize the essential truth from multiple inputs. This agent embodies John Carmack's engineering philosophy - first principles thinking, brutal honesty about trade-offs, and focus on what actually works. Examples: <example>Context: Multiple agents have provided conflicting recommendations about system architecture. user: "I have 5 different architectural proposals and need to decide which approach is actually best" assistant: "I'll use the john-carmack-synthesizer to cut through the complexity and identify the fundamental constraints and optimal solution." <commentary>When faced with multiple complex inputs, this agent strips away the noise to find the core engineering truth.</commentary></example> <example>Context: Team is over-engineering a solution with unnecessary abstractions. user: "Our trading system design has become overly complex with too many layers" assistant: "Let me use the john-carmack- |
package benchmark | |
import ( | |
"strconv" | |
"testing" | |
) | |
var resultSink []byte | |
func BenchmarkConvertIntToString(b *testing.B) { |
// Needs Bun | |
import biome from './biome.json'; | |
// Extracted from https://biomejs.dev/linter/rules/#recommended-rules | |
const recommended = (await Bun.file('./recommended.txt').text()) | |
.split('\n') | |
.map((x: string) => x.trim()) | |
.filter(Boolean); |
Per https://code.google.com/p/v8/codesearch#v8/trunk/src/runtime.cc | |
%CreateSymbol | |
%CreatePrivateSymbol | |
%CreateGlobalPrivateSymbol | |
%NewSymbolWrapper | |
%SymbolDescription | |
%SymbolRegistry | |
%SymbolIsPrivate |
%GetOptimizationStatus
return a set of bitwise flags instead of a single value,
to access the value, you need to take the binary representation of the returned value.
Now, for example, if 65
is returned, the binary representation is the following:
(65).toString(2).padStart(12, '0');
// 000001000001
Each binary digit acts as a boolean with the following meaning:
// Step 1: Define the Branded Type | |
type LowercaseString = string & { __brand: "LowercaseString" }; | |
// Step 2: Type Guard Function | |
function toLowercaseString(s: string): LowercaseString { | |
return s.toLowerCase() as LowercaseString; | |
} | |
// Step 3: Override Type Definitions | |
type RemoveToLowerCase<T> = Omit<T, "toLowerCase">; |
declare const __brand: unique symbol | |
type Brand<B> = { [__brand]: B } | |
export type Branded<T, B> = T & Brand<B> | |
/** | |
* Branded type for a person's age, should belong to the interval [0, 125] (inclusive) | |
**/ | |
type Age = Branded<number, "Age">; | |
/** |