Chaitin's graph-coloring allocation, which you are implementing, ran in IBM's compilers for decades and remains the textbook standard; LLVM's greedy allocator and the linear-scan allocators in V8 and HotSpot are its descendants, engineered for compile speed. Register allocation quality is often the single biggest codegen factor in hot-loop performance.