* Idea: Use of gethash/puthash for GNU Emacs 21?
@ 2001-05-31 7:10 Christoph Conrad
2001-06-02 8:23 ` Christoph Conrad
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Conrad @ 2001-05-31 7:10 UTC (permalink / raw)
Cc: cc
Hello,
Gnus uses gnus-gethash/gnus-sethash, which in fact uses obarrays
(hashes). I don't know if there is a significant speedup of using
native gethash/puthash in the case of big hash tables and GNU Emacs
Version greater/equal 21. At least there should be a significant
memory saving, as far as i remember early discussions about them.
When i get time in the next days i will do some performance
comparisons.
Best regards,
cu, -cc-
--
=> GNU Emacs Webring @ <http://www.gnusoftware.com/WebRing/> <=
Look Ma, this man can twist his fingers as if they were made of rubber,
isn't that amazing? -- Not really, he's been using emacs for years...!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Idea: Use of gethash/puthash for GNU Emacs 21?
2001-05-31 7:10 Idea: Use of gethash/puthash for GNU Emacs 21? Christoph Conrad
@ 2001-06-02 8:23 ` Christoph Conrad
2001-08-19 20:54 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Conrad @ 2001-06-02 8:23 UTC (permalink / raw)
> When i get time in the next days i will do some performance
> comparisons.
Ok, done so. Used Lars Magne Ingebrigtsen's benchmark.el (from
quimby.gnus.org).
(benchmark 10000 (gnus-sethash (int-to-string (random 1000))
(random 1000)
hashtable))
(benchmark 10000 (gnus-gethash (int-to-string (random 1000))
hashtable))
the same for puthash/gethash (with makehash called without args). I
made garbage collections before each measurement. gc-cons-threshold's
value is 3000000 and the repeat count to benchmark only 10000 to
prevent any garbage collections.
The result is astonishing: performance is nearly identical for this
_very_ limited testset.
Best regards,
cu, -cc-
--
=> GNU Emacs Webring @ <http://www.gnusoftware.com/WebRing/> <=
Look Ma, this man can twist his fingers as if they were made of rubber,
isn't that amazing? -- Not really, he's been using emacs for years...!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Idea: Use of gethash/puthash for GNU Emacs 21?
2001-06-02 8:23 ` Christoph Conrad
@ 2001-08-19 20:54 ` Lars Magne Ingebrigtsen
2001-09-01 16:37 ` Dave Love
0 siblings, 1 reply; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2001-08-19 20:54 UTC (permalink / raw)
Christoph Conrad <christoph.conrad@gmx.de> writes:
[puthash vs. gnus-sethash]
> The result is astonishing: performance is nearly identical for this
> _very_ limited testset.
I would have thought the only difference would be in the memory usage
-- except for garbage collecting (and swapping :-), gnus-sethash
should be pretty optimal. I mean, it just uses `intern', and since
one of the most central parts of Emacs is symbol lookup, it's bound to
be pretty optimized...
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Idea: Use of gethash/puthash for GNU Emacs 21?
2001-08-19 20:54 ` Lars Magne Ingebrigtsen
@ 2001-09-01 16:37 ` Dave Love
0 siblings, 0 replies; 4+ messages in thread
From: Dave Love @ 2001-09-01 16:37 UTC (permalink / raw)
>>>>> "LMI" == Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
LMI> I mean, it just uses `intern', and since one of the most central
LMI> parts of Emacs is symbol lookup, it's bound to be pretty
LMI> optimized...
The performance of interning probably has room for improvement, though
as far as I remember, the ...hash functions use the same algorithm and
parameters.
The salient feature of hash tables in Gnus is that various code
depends on them being obarrays, since it uses `read' to intern into
them. That said, the Gnus functions should still be used
consistently, rather than explicitly creating obarrays in various
places.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-09-01 16:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-31 7:10 Idea: Use of gethash/puthash for GNU Emacs 21? Christoph Conrad
2001-06-02 8:23 ` Christoph Conrad
2001-08-19 20:54 ` Lars Magne Ingebrigtsen
2001-09-01 16:37 ` Dave Love
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 NNTP newsgroup(s).