emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] add 'string-distance' to calculate Levenshtein distance


From: Nathan Moreau
Subject: Re: [PATCH] add 'string-distance' to calculate Levenshtein distance
Date: Sat, 14 Apr 2018 19:18:08 +0200

Hi,

What is the difference with the code present in lib/diffseq.h?



On 14 April 2018 at 04:35, Chen Bin <address@hidden> wrote:
> Hello,
> Attached patch implemented 'string-distance' is much faster then
> existing Lisp implementation like 'org-babel-edit-distance'.
>
> I benchmarked by below snippet:
>
>   (setq s1 "projs1/emacs/etc/imeees/icon/emacs-document.svg")
>   (setq s2 "projs2/test/etc/images/icons/emacs-document23.svg")
>   (let* ((gc-cons-threshold most-positive-fixnum))
>     (message "%S vs %S"
>              (benchmark-run-compiled 100
>                (org-babel-edit-distance s1 s2))
>              (benchmark-run-compiled 100
>                (string-distance s1 s2))))
>
> Got:
> (0.506494223 0 0.0) vs (0.001317414 0 0.0)
>
>
>
> --
> Best Regards,
> Chen Bin
>
> --
> Help me, help you
>



reply via email to

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