You forget that a badly implemented efficient algorithm beats
an efficiently implemented bad algorithm most of the time.
Before you go switching to C and doing direct access in the
data, see whether you can optimize the datastructure. Perhaps
a different structure is much smaller, or needs far less
access.