mod: use position to replace array resize
mod: remove unused variables
add: benchmark test js