|
Boost Users : |
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2006-11-08 03:29:20
james.jones_at_[hidden] wrote:
> doing an array lookup is O(n).
Huh?
Array indexing is constant time. The compiler doesn't scan the array, it
uses the switch value directly as the index (after some mathematical
transformation, perhaps.)
Sebastian Redl
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net