performance improvement for k argument autofill