emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to add pseudo vector types


From: Yuan Fu
Subject: Re: How to add pseudo vector types
Date: Mon, 19 Jul 2021 11:16:01 -0400

> On Jul 17, 2021, at 1:30 PM, Stefan Monnier <monnier@iro.umontreal.ca> 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

Attachment: benchmark.3.txt
Description: Text document

Attachment: main-c.c
Description: Binary data

Attachment: main-json.c
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]