posted 9 years ago
according to the given information, the best way is to write the code in whatever way is the cleanest, easiest to read, understand, and maintain. Your specs have no requirements for any kind of speed, so forget about it entirely. You will almost ALWAYS be better writing code that makes sense over trying to do micro-optimization but add hundreds of hours to coding and debugging time.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors