Gnus development mailing list
 help / color / mirror / Atom feed
From: Dave Love <d.love@dl.ac.uk>
Subject: Re: fast local-file storage for Gnus
Date: Tue, 17 Jun 2003 23:06:20 +0100	[thread overview]
Message-ID: <rzq1xxs4aw3.fsf@albion.dl.ac.uk> (raw)
In-Reply-To: <4nbrx2cai6.fsf@lockgroove.bwh.harvard.edu>

Ted Zlatanov <tzz@lifelogs.com> writes:

> Right, but I don't know how to write that primitive in C, and in Lisp
> it would probably be too slow.

One doesn't go writing things as primitives without measuring the Lisp
version (if writing it in Lisp is possible), at least without a lot of
experience.

> If we're going to write that
> primitive, why not make it a generic interface with
> get/set/delete/commit functions with a plain text backend?  

If you don't need to do any more than dump and restore a table, you
don't need to introduce a new Lisp type, for instance.

> I really don't know what to measure, since there's only the
> alist-to-plain-file mechanism right now :)

I don't understand why you think you need to build an alist:

(let ((table (make-hash-table)))	; should be given realistic size
  (with-temp-buffer
    (insert-file-contents "fred")
    (condition-case ()
	(let ((standard-input (current-buffer)))
	  (while t
	    (puthash (read) (read) table))) ; assumes LR arg evaluation
      (error nil)))
  table)

-- 
We should forget about small efficiencies, say about 97% of the
time: premature optimization is the root of all evil.  -- Donald Knuth



  reply	other threads:[~2003-06-17 22:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-23 20:31 Ted Zlatanov
2003-05-24 11:08 ` Kai Großjohann
     [not found]   ` <84wuggy548.fsf@lucy.is.informatik.uni-duis?= =?iso-8859-15?q?burg.de>
2003-05-24 12:03     ` Matthias Andree
2003-05-24 13:22       ` Ted Zlatanov
2003-05-24 13:47         ` Matthias Andree
2003-05-24 13:36       ` Kai Großjohann
2003-05-30 13:28 ` Dave Love
2003-05-30 13:57   ` Josh Huber
2003-05-30 15:23     ` Ted Zlatanov
2003-06-03 11:02       ` Dave Love
2003-06-03 15:37         ` Ted Zlatanov
2003-06-12 22:25           ` Dave Love
2003-06-13 14:33             ` Ted Zlatanov
2003-06-17 22:06               ` Dave Love [this message]
2003-06-03 11:00     ` Dave Love
2003-06-03 13:35       ` Kai Großjohann

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

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

  git send-email \
    --in-reply-to=rzq1xxs4aw3.fsf@albion.dl.ac.uk \
    --to=d.love@dl.ac.uk \
    /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.
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).