From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: vhash speed thread safeness Date: Tue, 29 Oct 2013 13:34:35 +0100 Message-ID: <87zjpsp86c.fsf@gnu.org> References: <3150759.E8ExfKuC24@warperdoze> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1383050124 25681 80.91.229.3 (29 Oct 2013 12:35:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Oct 2013 12:35:24 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Oct 29 13:35:27 2013 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vb8W4-0007DJ-DG for guile-devel@m.gmane.org; Tue, 29 Oct 2013 13:35:24 +0100 Original-Received: from localhost ([::1]:46887 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vb8W3-0008T2-N9 for guile-devel@m.gmane.org; Tue, 29 Oct 2013 08:35:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42339) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vb8Vu-0008Sp-Lp for guile-devel@gnu.org; Tue, 29 Oct 2013 08:35:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vb8Vn-0004b0-6h for guile-devel@gnu.org; Tue, 29 Oct 2013 08:35:14 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:54798) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vb8Vn-0004Zj-0g for guile-devel@gnu.org; Tue, 29 Oct 2013 08:35:07 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Vb8Vk-000749-DM for guile-devel@gnu.org; Tue, 29 Oct 2013 13:35:04 +0100 Original-Received: from 193.50.110.112 ([193.50.110.112]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Oct 2013 13:35:04 +0100 Original-Received: from ludo by 193.50.110.112 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Oct 2013 13:35:04 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 27 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 193.50.110.112 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 8 Brumaire an 222 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:2893Fe+q4TCAPzZL/MVo9/FjW0E= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:16696 Archived-At: Hi, Stefan, Stefan Israelsson Tampe skribis: > I did some tests witha C-based vhash implementation, it's possible to > increse the speed by 30x compared to current vlist imlpementation in > guile. It would be possible to get this speed today if one implemented > vhash-assoc as a VM op. Anyway using the source as a standard lib will > get you about 10x speed increase. As we discussed, I don’t really like the idea of implementing that much in C. Also, I’d really like the optimization effort to be driven by actual profiling data, such as C-level profiles of repeated calls to the current ‘vhash-assoc’. Have you tried that? > Another pressing need is that vhashes are not thread safe, Section 2.8 of Bagwell’s paper proposes a simple solution. All that is missing AFAICS is an atomic test-and-set VM op to implement it (which may also be useful in other places.) What do you think of this approach? Thanks, Ludo’.