That only has to be done once, to create a lookup table. And one would anyways just use some basic animation for something like that or a shader. One can also do a lot of cool stuff with vertex colors.
Also a loop through 10k vertices is not really a problem on current computer hardware. Also polygonal collision detection has to do it as well (can be optimized in some ways, but this is the same case for looping through those vertices for your animation).