From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Stefan Kangas <stefan@marxist.se>,
Emacs developers <emacs-devel@gnu.org>
Subject: Re: OKURI-NASI
Date: Mon, 30 May 2022 15:19:23 +0200 [thread overview]
Message-ID: <87wne3w42s.fsf@gnus.org> (raw)
In-Reply-To: <jwvfskr6vlc.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 30 May 2022 09:06:48 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Doing some very light profiling here, a lot of the time is taken up by
>> skkdic-get-entry, which is just lookup-nested-alist.
>
> Odd: `skkdic-get-entry` didn't even appear in the profile I got (and
> `lookup-nested-alist` was dwarfed by other things):
It's a defsubst -- I was profiling uncompiled code:
6278 48% - skkdic-breakup-string
6262 48% - let
6258 48% - or
6242 48% - and
5871 45% - let
5763 44% - while
5735 44% - let
3995 30% + skkdic-get-entry
>> My guess is that if somebody took a look ja-dic-cnv.el, this algorithm
>> could be made substantially more efficient by using other data
>> structures than an extremely long nested alist.
>
> I believe those (nested) alists shouldn't be that long (IIUC it's
> a trie-like data-structure, a bit like keymaps, so even with many
> entries in total, the total depth of the tree should be fairly short and
> the length of each list (i.e. the out degree of each node) shouldn't be
> very large either).
Hm, right...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
prev parent reply other threads:[~2022-05-30 13:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-29 20:18 OKURI-NASI Lars Ingebrigtsen
2022-05-29 20:22 ` OKURI-NASI Lars Ingebrigtsen
2022-05-30 2:28 ` OKURI-NASI Eli Zaretskii
2022-05-30 9:47 ` OKURI-NASI Lars Ingebrigtsen
2022-05-30 11:39 ` OKURI-NASI Eli Zaretskii
2022-05-30 11:44 ` OKURI-NASI Lars Ingebrigtsen
2022-05-30 11:49 ` OKURI-NASI Lars Ingebrigtsen
2022-05-30 12:08 ` OKURI-NASI Eli Zaretskii
2022-05-30 15:22 ` OKURI-NASI Lars Ingebrigtsen
2022-06-01 2:54 ` OKURI-NASI Lars Ingebrigtsen
2022-05-30 7:31 ` OKURI-NASI Stefan Kangas
2022-05-30 9:53 ` OKURI-NASI Lars Ingebrigtsen
2022-05-30 13:06 ` OKURI-NASI Stefan Monnier
2022-05-30 13:19 ` Lars Ingebrigtsen [this message]
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.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wne3w42s.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=stefan@marxist.se \
/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.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).