support long inputs, add benchmarks