Not sure how expensive is `tpeTK`, but I mention it just in case: you already computed `tpeTK(larg)` in `resKind`.