Experiment: 87be4aa
rad experiment show 87be4aa12d4d932749f36033f8cc9e94ffeb7488
by ee@did:key:z6MkvsiybCuk1WDZhh2aXDx7NTiZejKgWZygMNsUuXDMNvVQ · Apr 11 20:05 2026
types:[node]
Measurements
MetricBaselineThe benchmark measurement of the unmodified codeCandidateThe code with the proposed optimization appliedDeltaThe performance change from baseline to candidate
tsc_check_ms (ms) primary1066.000 ms (n=1)1009.000 ms (n=1)-5.34%
Annotations
hypothesisSetting types:[node] prevents tsc auto-loading all 36 @types/* packages in node_modules. Most (aws-lambda, bunyan, chai, memcached, mysql, tedious, ws, etc) are transitively installed and never imported.
what_workedSamples [5162, 1040, 990, 1008, 1009] ms. Warm median 1009 vs 1066 = -57 ms (-5.3%). Cold run also -600 ms (5764 -> 5162). File count dropped 1350 -> 1291 (-59). Only @types/node is force-included; packages with imports still resolve normally via the package-lookup path.
Base CommitThe starting commit before the optimization was applied9fad0de6ded07745d50acbf9c5c9965612d5548e
Candidate CommitThe code with the proposed optimization applied953d0fdfb127fc99c7772a012f4b50384c628c19
Configoptimize.yaml
Diff
~ tsconfig.json
@@ -32,7 +32,7 @@
32 // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ 33 // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ 34 // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ 35- // "types": [], /* Specify type package names to be included without being referenced in a source file. */ 35+ "types": ["node"], 36 // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 37 // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ 38 // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
Environment
Buildtrue
Teststrue
Archaarch64
OSDarwin 14.6.1
CPUApple M2
Agentpi-autoresearch / pi
Filestsconfig.json