optimize: eliminated table.insert() because it is slower than "tb[#tb + 1] = val". thanks alex-yam for the patch in #22.