From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: vhash speed thread safeness Date: Mon, 24 Mar 2014 21:59:28 +0100 Message-ID: <87lhvzuxcf.fsf@pobox.com> References: <3150759.E8ExfKuC24@warperdoze> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1395694781 5705 80.91.229.3 (24 Mar 2014 20:59:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 24 Mar 2014 20:59:41 +0000 (UTC) Cc: guile-devel@gnu.org To: Stefan Israelsson Tampe Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Mar 24 21:59:52 2014 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 1WSByJ-0006z9-I8 for guile-devel@m.gmane.org; Mon, 24 Mar 2014 21:59:51 +0100 Original-Received: from localhost ([::1]:38331 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSByJ-0004Dd-2O for guile-devel@m.gmane.org; Mon, 24 Mar 2014 16:59:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSBy9-0004DJ-IM for guile-devel@gnu.org; Mon, 24 Mar 2014 16:59:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WSBy0-0000bl-Fl for guile-devel@gnu.org; Mon, 24 Mar 2014 16:59:41 -0400 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:43605 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSBy0-0000bg-Bo for guile-devel@gnu.org; Mon, 24 Mar 2014 16:59:32 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 6DD4811458; Mon, 24 Mar 2014 16:59:31 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=L6Jb6aExMSbeybG94w9UzLjQTbM=; b=V9xhiO 0Vyy8+N+TInH8snHC+LEqRFhA4qSFmL3gTOXmr0dAfA7jQdQDi/sShtjvJ4jMXsR 6mE0Ap8GF3dM3I6gqIcUdaBp7BwrnxPdFUJtkuSPLlQ4xZpXHmm5WUMiG3cF3/r/ r374inLQImEHTBjBWXvhZzN4Cv33DzoRh/iUQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=X8aUy+sZwWIkqrKy8IXRjgVn08cqVu8g Y61kA+sgdvIVUOk+JzC/HIPLKCRqQyLzaSmyzxbaeLJvSV0DyCV4lCQFzOOKgdis q2UpxsKJWmS/qTViU2HeZdSj5pH8OnM4O8wP6w4yd3eW+OncEk8Dc4vmI2M+KoBk AY/BaHiKa2o= Original-Received: from a-pb-sasl-quonix.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 6432B11457; Mon, 24 Mar 2014 16:59:31 -0400 (EDT) Original-Received: from badger (unknown [88.160.190.192]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id B0EE411456; Mon, 24 Mar 2014 16:59:30 -0400 (EDT) In-Reply-To: <3150759.E8ExfKuC24@warperdoze> (Stefan Israelsson Tampe's message of "Fri, 18 Oct 2013 18:21:04 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-Pobox-Relay-ID: 31D2F440-B397-11E3-9B48-873F0E5B5709-02397024!a-pb-sasl-quonix.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 208.72.237.25 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:16999 Archived-At: Hi, Just a late observation :) On Fri 18 Oct 2013 18:21, Stefan Israelsson Tampe writes: > 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. If you are using stable-2.0 you are using a bad hash function. Master has a much better one, though we should still replace it with Siphash or something soon. Anyway it can be quite a problem for vhashes. Incidentally, this test case: (use-modules (ice-9 vlist)) (define vl (let lp ((n 0)) (if (= n 26) vlist-null (vhash-consq (string->symbol (string (integer->char (+ (char->integer #\a) n)))) n (lp (1+ n)))))) (let lp ((n 0)) (when (< n #e1e6) (vhash-assq 'j vl) (lp (1+ n)))) takes 1.5s in stable-2.0 and 0.17s in master. The hash function isn't the only difference of course. Andy -- http://wingolog.org/