help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to count the number of occurrences of a character in a string?


From: Eli Zaretskii
Subject: Re: How to count the number of occurrences of a character in a string?
Date: Tue, 13 Oct 2015 22:07:10 +0300

> From: Kaushal Modi <kaushal.modi@gmail.com>
> Date: Tue, 13 Oct 2015 13:43:05 -0400
> Cc: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>
> 
> I am, though, unable to quantify which approach is the fastest using
> `benchmark`.
> 
> I ran the below wrapper progn block couple of times and I got
> different results each time. Oddly enough, I even got negative
> execution times.
> What am I doing wrong?

Could be a bug in 'benchmark'.  Just call float-time before and after,
and subtract the values, it should be good enough.



reply via email to

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