Problem
Variable lookup is O(n) linear \strcmp\ scan over \env->entries[]. Paid on every read, write, alias check, and type check. Deep parent-chain walks multiply the cost.
Location: \src/env.c:167-174\ (\env_find_local), all \env_get*/\env_assign*\ paths
Proposed Fix
Add open-addressing hash table to \struct Env\ (keep \entries[]\ for iteration). Insert on \env_define_direct, use for lookup in \env_find_local, \env_get_entry_raw, \env_assign_direct, \env_delete_direct, and alias paths.
Status
Baseline still present — no hash table added to \struct Env\ at \src/env.h:26-32. \env_find_local\ still does linear scan.
Problem
Variable lookup is O(n) linear \strcmp\ scan over \env->entries[]. Paid on every read, write, alias check, and type check. Deep parent-chain walks multiply the cost.
Location: \src/env.c:167-174\ (\env_find_local), all \env_get*/\env_assign*\ paths
Proposed Fix
Add open-addressing hash table to \struct Env\ (keep \entries[]\ for iteration). Insert on \env_define_direct, use for lookup in \env_find_local, \env_get_entry_raw, \env_assign_direct, \env_delete_direct, and alias paths.
Status
Baseline still present — no hash table added to \struct Env\ at \src/env.h:26-32. \env_find_local\ still does linear scan.