thanks Kovid for the great work! Turn on --input-encoding certainly helps,
Code:
specify encoding NOT specify encoding
----------------------------------------------------------------
time 22s 36s
total
func calls 14M 30M
top1 func call ord (0.7M) ord (16M)
It still not fast enough for a 5000 line text file, also the encoding detecting along takes 14 seconds. Something is not completely right.