> On Jul 17, 2021, at 1:30 PM, Stefan Monnier wrote: > > In your benchmark , you give numbers for: > - initial full-text parse (a bit above 1MB/s) > - cost of update-without-reparse > > but I think it would be nice to see the cost of the reparse after > those updates (should be much faster than the initial parse). I have done some more benchmark. Initially I thought tree-sitter doesn’t scale, because re-parsing my JSON file is unexpectedly slow, but then I retired with xdisp.c with tree-sitter's C parser, and that is really fast and matches my expectation of tree-sitter. So from now on I’ll use xdispf.c and the C parser for benchmarking. I guess the json parser is simply bad-written? I benchmarked with a simple C program. The programs are in main-c.c and main-json.c, and the shell output of the measurements is in benchmark.3.txt. JSON: Initial parse takes 1.2s, re-parse (with no change) takes 0.7s, uses 307MB memory C: Initial parse takes 0.14s, re-parse (with no change) takes 0.009s, uses 20MB memory Yuan