emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Timothy <tecosaur@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [ANN] An Org parser for Julia
Date: Thu, 02 Dec 2021 20:07:31 +0800	[thread overview]
Message-ID: <87a6hji518.fsf@localhost> (raw)
In-Reply-To: <87h7brp7gz.fsf@gmail.com>

Timothy <tecosaur@gmail.com> writes:

> │ julia> @benchmark parse(Org, config)
> │ BenchmarkTools.Trial: 139 samples with 1 evaluation.
> │  Range (min … max):  34.042 ms … 43.269 ms  ┊ GC (min … max): 0.00% … 16.10%
> │  Time  (median):     34.857 ms              ┊ GC (median):    0.00%
> │  Time  (mean ± σ):   35.999 ms ±  2.490 ms  ┊ GC (mean ± σ):  2.63% ±  5.30%
> │ 
> │     █▁
> │   ▃▇██▄▆▄▃▂▃▅▅▅▄▄▂▂▂▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▂▂▃▁▃▂▂▃▂▃▁▁▂▃▁▂▂▁▂ ▂
> │   34 ms           Histogram: frequency by time          43 ms <
> │ 
> │  Memory estimate: 7.17 MiB, allocs estimate: 142185.
> └────
>
> It’s worth noting that the first time `parse(Org, config)' is called, it will
> trigger JIT compilation (which for me takes ~15s).
>
> `org-element-parse-buffer' seems to tend to take ~200ms.

Just FYI that I am getting similar results on your config.org:

M-: (let ((gc-cons-threshold #x40000000)) (benchmark-run (org-element-parse-buffer)))
(0.133567423 0 0.0), which is 133ms

and

@benchmark parse(Org, textorgfile)
BenchmarkTools.Trial: 196 samples with 1 evaluation.
 Range (min … max):  22.235 ms … 81.101 ms  ┊ GC (min … max): 0.00% … 0.00%
 Time  (median):     23.652 ms              ┊ GC (median):    0.00%
 Time  (mean ± σ):   25.535 ms ±  5.921 ms  ┊ GC (mean ± σ):  2.56% ± 5.36%

    █▃      ▂▂                                                 
  ▆▅███▇▅▅▁▅██▆▄▄▁▁▁▁▁▁▁▁▁▁▁▁▁▄▁▁▅▁▅▁▁▄▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▄▁▄ ▄
  22.2 ms      Histogram: log(frequency) by time      51.3 ms <

 Memory estimate: 7.07 MiB, allocs estimate: 139566.

Best,
Ihor

  reply	other threads:[~2021-12-02 12:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-02  9:06 [ANN] An Org parser for Julia Timothy
2021-12-02 10:11 ` Ihor Radchenko
2021-12-02 10:30   ` Timothy
2021-12-02 11:13     ` Ihor Radchenko
2021-12-02 11:20       ` Timothy
2021-12-02 12:07         ` Ihor Radchenko [this message]
2021-12-02 12:11           ` Timothy
2021-12-02 12:18 ` Eric S Fraga
2021-12-02 14:04   ` Timothy
2021-12-02 15:56     ` Eric S Fraga
2022-09-25  8:02 ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a6hji518.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tecosaur@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).