From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tim Meehan Newsgroups: gmane.lisp.guile.user Subject: Re: is there a way to serialize hash tables? Date: Sat, 26 Dec 2020 23:58:06 -0600 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5110"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-user Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sun Dec 27 06:58:48 2020 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ktP4o-0000zu-Gx for guile-user@m.gmane-mx.org; Sun, 27 Dec 2020 06:58:46 +0100 Original-Received: from localhost ([::1]:55788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktP4n-00087F-Bb for guile-user@m.gmane-mx.org; Sun, 27 Dec 2020 00:58:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59518) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktP4O-00086u-Tf for guile-user@gnu.org; Sun, 27 Dec 2020 00:58:22 -0500 Original-Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]:37032) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ktP4M-0004Z6-Sz for guile-user@gnu.org; Sun, 27 Dec 2020 00:58:20 -0500 Original-Received: by mail-qt1-x830.google.com with SMTP id z9so5125386qtn.4 for ; Sat, 26 Dec 2020 21:58:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:cc; bh=fpxM5+lpg5oE9zbjwS7QCawiD5qbj7bNLw7LUqbkW7s=; b=AtQ5oqnmvZhYLlRU6nLp9x1oFM3We3jb+P5mzWYMduSlfihYW1YsY/D6wfbbTsyrfX IQ3CKFG8AYxeCNASb64mpXHW/MXSnV0EhLz7AcWbrWTky9MFORBhsj5QYmv5VfBQvyM4 ZBG3d4C8oZJgTSwL4mlJAokEob/njbUnFE8D+7H82f1rf4eyX/7F8M31Lh6NVRHtM6Rm BnEi4GfaYHMk1nVsXfiGUi/rlNMjSe9zX//d5U2XY5ghXRgukveZuQ5h2nFaRyO7nfVc mKFeoH7DAf79zGIJvUPtCbE6FfSf8P/+2aAca5UxHTL8NWq23mK4FZV6mR0suN68TCgG NccQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:cc; bh=fpxM5+lpg5oE9zbjwS7QCawiD5qbj7bNLw7LUqbkW7s=; b=RoddzyNTHhCNyksGgluIqrLQnf7ljNsqNea1VBwkTfKmu2e7HxKWkMm/od1AkxcPiI gtIlGuM08o5OJZUsck5IC0335VdMPuRmooLUDdsL02xToft35vLgbTylLPF0882/zkUj BURiIax2CTssJjpYbHGcFDy6vdyrwnLkZkENKRkxgnjz3ubbkuR2ivBH++0pq0lr0ldN slnASZ1aaW9cBdzKYalIQaag2x4Ec9VTUWDDdcJDDuLPMVL7ysCgA448t2UYye7OArZd qiEx6tWoTyGbCyzMqvrfuN517RbzwRXypaDwcnnKqj+aGPaqvhXPAkfugsVQSJhqi8KS xVAw== X-Gm-Message-State: AOAM531NUN2SrNFjsSl8/g3RgXYEoje6hekDdDQd+kEJIadWk5cCJhjX cUc+9vaKieGJgn9tSvg3h1b1B2x4WROIKnaL7UTCiA8l X-Google-Smtp-Source: ABdhPJylD84lLOQIKm6rb4Ylx4eDUgg6gINcl0BAFhmVjxQKThkJ4E1Iz9+xH1SF6yad9nB0vuSqEKAKetiztT+AVyc= X-Received: by 2002:ac8:5808:: with SMTP id g8mr39224254qtg.208.1609048696935; Sat, 26 Dec 2020 21:58:16 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::830; envelope-from=btmeehan@gmail.com; helo=mail-qt1-x830.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, MISSING_HEADERS=1.021, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:17115 Archived-At: Thanks a lot guys - I did a test with the stored alist and it was plenty fast enough for what I needed. I had looked at guile-json for reading in some settings. It is good to know that it is very fast also. On Sat, Dec 26, 2020 at 6:10 AM Linus Bj=C3=B6rnstam wrote: > Alex and I got the speed of guile-json up to about 19megs a second under > guile 3 on a 4 year old intel i5, which may or may not be adequate for yo= ur > needs, Tim. > > I have some code I wrote during that spurt that preforms slightly better > than guile-json in general (about 3-4% on my machine. Alex could not repe= at > those numbers) an on files with many large strings in particular (10% in > extreme cases). If that is interesting I could put it online somewhere. > The functioning code is a derivate work of guile-json, so the GPL applies= . > > -- > Linus Bj=C3=B6rnstam > > On Sat, 26 Dec 2020, at 05:28, John Cowan wrote: > > I think that's the best bet, although JSON is also a possibility. I'm > > working on a more general text-serialization solution, but it will be > quite > > some time before I have a chance to work on it. > > > > On Fri, Dec 25, 2020 at 10:28 PM Tim Meehan wrote: > > > > > I have a big-ish blob of key-value pairs that I would like to not hav= e > to > > > store as text and then convert to a hashtable when I am filtering my > data. > > > > > > Right now I am saving it as an alist and then converting back to a > > > hashtable using "alist->hashtable" from SRFI 69. I was just hoping th= at > > > there was something more clever ... perhaps it is plenty clever enoug= h. > > > > > >