From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.bugs Subject: bug#17049: [PATCH v2] Make reverse! forego the cost of SCM_VALIDATE_LIST Date: Tue, 01 Apr 2014 10:09:32 -0400 Message-ID: <87k3b9kuoz.fsf@yeeloong.lan> References: <87zjk6m9ap.fsf@yeeloong.lan> <1396348019-7418-1-git-send-email-dak@gnu.org> <87ob0ljpsa.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1396361579 3733 80.91.229.3 (1 Apr 2014 14:12:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Apr 2014 14:12:59 +0000 (UTC) Cc: 17049@debbugs.gnu.org To: David Kastrup Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Apr 01 16:12:52 2014 Return-path: Envelope-to: guile-bugs@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 1WUzQo-0004eB-Lf for guile-bugs@m.gmane.org; Tue, 01 Apr 2014 16:12:50 +0200 Original-Received: from localhost ([::1]:60616 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUzQo-0002qz-4Y for guile-bugs@m.gmane.org; Tue, 01 Apr 2014 10:12:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51251) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUzPA-0000I9-9z for bug-guile@gnu.org; Tue, 01 Apr 2014 10:11:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WUzP4-0000YA-Ex for bug-guile@gnu.org; Tue, 01 Apr 2014 10:11:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUzP4-0000Y0-81 for bug-guile@gnu.org; Tue, 01 Apr 2014 10:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WUzP3-0006dL-U2 for bug-guile@gnu.org; Tue, 01 Apr 2014 10:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 01 Apr 2014 14:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17049 X-GNU-PR-Package: guile X-GNU-PR-Keywords: patch Original-Received: via spool by 17049-submit@debbugs.gnu.org id=B17049.139636143125450 (code B ref 17049); Tue, 01 Apr 2014 14:11:01 +0000 Original-Received: (at 17049) by debbugs.gnu.org; 1 Apr 2014 14:10:31 +0000 Original-Received: from localhost ([127.0.0.1]:59414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WUzOY-0006cP-Tk for submit@debbugs.gnu.org; Tue, 01 Apr 2014 10:10:31 -0400 Original-Received: from world.peace.net ([96.39.62.75]:49624) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WUzOW-0006cG-3A for 17049@debbugs.gnu.org; Tue, 01 Apr 2014 10:10:28 -0400 Original-Received: from 209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.91.212] helo=yeeloong.lan) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1WUzOP-0000eT-NE; Tue, 01 Apr 2014 10:10:21 -0400 In-Reply-To: <87ob0ljpsa.fsf@fencepost.gnu.org> (David Kastrup's message of "Tue, 01 Apr 2014 12:40:53 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7441 Archived-At: David Kastrup writes: > Sigh. In case you are committing this, there might be one minor change > worth doing to match the coding style: > >> + scm_wrong_type_arg (FUNC_NAME, 1, lst); > > This should likely be > > SCM_WRONG_TYPE_ARG (1, lst); > > for consistency with other usage in list.c. I can reroll if you prefer > this over fixing it yourself. Please reroll, since there's also make a change to the commit log I'd like. You wrote: > * libguile/list.c (scm_reverse_x): Do not check first argument to > reverse! to be a proper list in advance. This provides the > performance of a version without validation (tests show a speedup by a > factor of 1.8) except for the error case. As the GNU coding standards suggest, we prefer for change log entries to contain only a brief description of what changes were made, and to leave rationales and other explanations in the code comments. Therefore, I think you should remove the second sentence above, and also add a brief mention about undoing the reversal if the argument turned out to be improper. Thanks! Mark