From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: Re: High run time variance Date: Thu, 05 Aug 2010 16:45:41 +0200 Message-ID: References: <4BB0D0A7.7080505@gnu.org> <4C5ABFAB.2080006@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1281020362 8086 80.91.229.12 (5 Aug 2010 14:59:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 5 Aug 2010 14:59:22 +0000 (UTC) Cc: bug-guile@gnu.org To: Luca Saiu Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Aug 05 16:59:19 2010 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Oh1ue-0005NN-Ia for guile-bugs@m.gmane.org; Thu, 05 Aug 2010 16:59:17 +0200 Original-Received: from localhost ([127.0.0.1]:35519 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oh1ud-0006vT-PJ for guile-bugs@m.gmane.org; Thu, 05 Aug 2010 10:59:15 -0400 Original-Received: from [140.186.70.92] (port=52641 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oh1uF-0006mO-I9 for bug-guile@gnu.org; Thu, 05 Aug 2010 10:59:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oh1u8-0000cv-5m for bug-guile@gnu.org; Thu, 05 Aug 2010 10:58:51 -0400 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:36592 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oh1u8-0000c7-3u; Thu, 05 Aug 2010 10:58:44 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id C83E6C83A4; Thu, 5 Aug 2010 10:42:52 -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=hyiHJAREyGTZUAi49vU1ORRAcPM=; b=HTUZ52 RdDGlB+rJK1PVMQRpl9hgYJTXddznSuutUqsAdcEK7luecOGWs80N94cii5dD7dt /HYag/8gWhhDdupJG97QSHO1wHb3Kzk+AIo9etRyjjBA5KaOzRCIjitgc7YAYhgV IQzbvFaZf9iZZohnWXotYKdc6+5s7W+B1NKmI= 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=s6QRv7BxK6oUGNUKSFkNFAUFFpE+bUlB Y9pQxDsS6xvTLanqO0Nnc3HmiuVYLp7EmsWqwwV0p3l/AETKBt56XWt8mnVto07M L2Yq5nqSX8X7D7osBRuXo9XNSZol+5AngSCrbPc8M0o+jSZuJL2CJIgkVArTsHGc OTjWYW/5WXg= Original-Received: from a-pb-sasl-quonix. (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id AC0A9C83A1; Thu, 5 Aug 2010 10:42:51 -0400 (EDT) Original-Received: from unquote.localdomain (unknown [83.44.189.117]) (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 7B36AC839F; Thu, 5 Aug 2010 10:42:49 -0400 (EDT) In-Reply-To: <4C5ABFAB.2080006@gnu.org> (Luca Saiu's message of "Thu, 05 Aug 2010 15:42:03 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: B97F4628-A09F-11DF-8B05-9056EE7EF46B-02397024!a-pb-sasl-quonix.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:4727 Archived-At: Hi, On Thu 05 Aug 2010 15:42, Luca Saiu writes: > ;;; Why does this GCs after creating b? Try running this with GC_PRINT_STATS=1, > ;;; or with GC_DONT_GC=1 if you want to see the memory use rise. > > (define size 100000) > (define times 100) > > (define b (make-bitvector size)) > > (do ((t 0 (1+ t))) > ((= t times) 'done) > (do ((i 0 (1+ i))) > ((= i size) 'done) > (bitvector-set! b i #t))) The toplevel references to bitvector-set! don't get cached, so the bitvector-set! gets looked up every time, and there is some unfortunate allocation in scm_from_locale_symboln. If you put it in a function, the variable gets cached, and there's no allocation. Andy -- http://wingolog.org/