From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id iIVuKVEZ22VjLwEA62LTzQ:P1 (envelope-from ) for ; Sun, 25 Feb 2024 11:41:21 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id iIVuKVEZ22VjLwEA62LTzQ (envelope-from ) for ; Sun, 25 Feb 2024 11:41:21 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=free.fr header.s=smtp-20201208 header.b=rRGYQ7a7; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=free.fr ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1708857681; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=anFLisizcAs20v4Z2BMW/jUNDStWt9ZWPiuhaWugz6A=; b=Rv9AyOCDkBic5QHz+Ffcy5l9JakYkBO41X7qoigD1FJ8xXBVssqX6K5T4OIJv/PJhfJQxW Y5W2O4mSc47t+Oa3kNMdc3rl5gYVdpKczMlBDj90gkHvsQ/K5XraCB6tHvkhAeSzS3Elk9 xCHzft8lGJV8MOqA442QTi29uzQkanU+69cR5AD6d2mFGkYhginYu2YqYXxxPTQ8mQ6qLF K/W+XrHfdleJfzmf0/Pa41xlyvPV+6L1tKvaeYWHngpKtTJpuLT2lNAWvM2I7rga31jFRJ 3HH75TElNpo6lImA+HNwvzEvmuGa3K3MUT1W8PlNnlw3upIoTny+BuBVtHGYAw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=free.fr header.s=smtp-20201208 header.b=rRGYQ7a7; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=free.fr ARC-Seal: i=1; s=key1; d=yhetil.org; t=1708857681; a=rsa-sha256; cv=none; b=ZsZJTVtOotrg1jglAQyY1jhWnhrWxcmZWHVVcqiNEVSuxz8yc95jf9qNZVUEZq0nAH8c0f O/kCv6XOcNPLHT9rF1ODNOkScD1kVJtLRYgnoeUIWN9mXoR3kFDYnzA1d0JH8YnLgLG6N+ QyWtvoDuoXRwGzkOP8rzTU+umdf9nw5/dzrYWPiJsofd6iX1Qua/da54AL0EcIzlQN4biv NDRRYprPYlWwksSwOnvXaTTsk7npkbvrzQALIljsoQ82ff4+tOkbhZ8Lob3iI4PYOZwP7w oqJyKfFsRAiysRJWxgD60VwLzp9zysy2m0cKTyydZxdCZUDRtFGFpiLhaJ5XBQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5EBB166237 for ; Sun, 25 Feb 2024 11:41:21 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1reBw5-00051r-Lp; Sun, 25 Feb 2024 05:40:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1reBw3-00051U-Hx for emacs-orgmode@gnu.org; Sun, 25 Feb 2024 05:40:43 -0500 Received: from smtp5-g21.free.fr ([212.27.42.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1reBw1-00072s-Dt for emacs-orgmode@gnu.org; Sun, 25 Feb 2024 05:40:43 -0500 Received: from [IPV6:2a01:e35:39f3:4610:5979:88a4:d8d0:165c] (unknown [IPv6:2a01:e35:39f3:4610:5979:88a4:d8d0:165c]) (Authenticated sender: tbanelwebmin@free.fr) by smtp5-g21.free.fr (Postfix) with ESMTPSA id 458595FFBA for ; Sun, 25 Feb 2024 11:40:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1708857636; bh=RfpYGbb6uCW5AgzHBcSA5LB7iVf4zmw9HcqMMTjmGBs=; h=Date:To:From:Subject:From; b=rRGYQ7a7pb75GSO5mVojr/jcK/TcKsa8ek7zAvU8/fLrhRRmBO1dnEmy7ao587zPn 0qIEiLzdklG7s0O9qH6HGhUqz2oRB+5iH1jVgycBH9UEa4SRBYxaRRqQJBfnEj1kkH FzFGtWkFIA+SvcnaAR3wOtwCTnPKrrsnp8RzGKrSLNkamtGagUhahviUqVhKqchqx1 eJ4zPEy+D8TvpS1u0aDcYTeyx9p5UGRieuLbq7dKzeaXw4qGZPetQati/xqYoHcew/ yIvAyT9ibZ7kgvG6FiK8pBnEE7C1ljg0AhZER3/rJ64gH/MeL7u85D+T58fgFta2h/ FyqFxF+v90yJg== Content-Type: multipart/mixed; boundary="------------SrifKQxsmEM8GU09mXcae0Aw" Message-ID: Date: Sun, 25 Feb 2024 11:40:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Content-Language: fr, en-US To: emacs-orgmode@gnu.org From: tbanelwebmin Subject: [PATCH] org-table-to-lisp enhanced Received-SPF: pass client-ip=212.27.42.5; envelope-from=tbanelwebmin@free.fr; helo=smtp5-g21.free.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -8.64 X-Spam-Score: -8.64 X-Migadu-Queue-Id: 5EBB166237 X-TUID: /7jpErvS/yfz This is a multi-part message in MIME format. --------------SrifKQxsmEM8GU09mXcae0Aw Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Here is a new version of `org-table-to-lisp'. Why a new version? - Because it is more than 3x faster than the current one.   Bench-marked on a 3822 rows by 16 columns Org table   - current: 0.405 seconds   - new one: 0.122 seconds   on Emacs 30.0.50 with native compilation   The speedup is achieved with or without native compilation. - Because it does not use regexps anymore.   It uses `following-char'   instead of `re-search-forward'   Therefore the global regexp state is no longer clobbered. - Because after a 120x speedup in May 2020   (by Nicolas Goaziou and myself)   it is funny to discover yet another way to a 3x speedup. - Because org-table-to-lisp is a basic   building block of Org Mode, used in   - table alignment   - table export   - Babel   - plotting   - table transposition - Because this version is a drop-in replacement.   The overall algorithm does not changed. I ran all the standard unit tests of Org Mode as of [2024-02-24]. All went as expected. Have fun Thierry --------------SrifKQxsmEM8GU09mXcae0Aw Content-Type: text/x-patch; charset=UTF-8; name="0001-org-table.el-Enhanced-table-parsing.patch" Content-Disposition: attachment; filename="0001-org-table.el-Enhanced-table-parsing.patch" Content-Transfer-Encoding: base64 RnJvbSAyMWIzZTMyNWU3M2Q0YTczMzI2MzFlZWVkOTNjYjJhMDI1ZTAyNGZkIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBUaGllcnJ5IEJhbmVsIDx0YmFuZWx3ZWJtaW5AZnJl ZS5mcj4KRGF0ZTogU2F0LCAyNCBGZWIgMjAyNCAxNzozMTo0NiArMDEwMApTdWJqZWN0OiBb UEFUQ0hdIG9yZy10YWJsZS5lbDogRW5oYW5jZWQgdGFibGUgcGFyc2luZwoKKiBsaXNwL29y Zy10YWJsZS5lbCAob3JnLXRhYmxlLXRvLWxpc3ApOiBSZWZhY3RvcmVkLgoqIGV0Yy9PUkct TkVXUzogRG9jdW1lbnQgY2hhbmdlcy4KCmBvcmctdGFibGUtdG8tbGlzcCcgaXMgc2lnbmlm aWNhbnRseSBmYXN0ZXIuCkl0IG5vIGxvbmdlciB1c2VzIHJlZ2V4cHMsIG5vciBjbG9iYmVy cyB0aGUgZ2xvYmFsIHJlZ2V4cCBzdGF0ZS4KLS0tCiBldGMvT1JHLU5FV1MgICAgICB8ICA2 ICsrKysrKwogbGlzcC9vcmctdGFibGUuZWwgfCAzNyArKysrKysrKysrKysrKysrKysrKysr KystLS0tLS0tLS0tLS0tCiAyIGZpbGVzIGNoYW5nZWQsIDMwIGluc2VydGlvbnMoKyksIDEz IGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL2V0Yy9PUkctTkVXUyBiL2V0Yy9PUkctTkVX UwppbmRleCBiNzlmMjc1YzQuLmE0MGEwZjIyNiAxMDA2NDQKLS0tIGEvZXRjL09SRy1ORVdT CisrKyBiL2V0Yy9PUkctTkVXUwpAQCAtMTI3NSw2ICsxMjc1LDEyIEBAIEZvciBzeW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y10YWJsZS10 by1saXNwKSkKICAgICAoc2F2ZS1leGN1cnNpb24KICAgICAgIChnb3RvLWNoYXIgKG9yZy10 YWJsZS1iZWdpbikpCi0gICAgICAobGV0ICgodGFibGUgbmlsKSkKLSAgICAgICAgKHdoaWxl IChyZS1zZWFyY2gtZm9yd2FyZCAiXFw9WyBcdF0qfCIgbmlsIHQpCi0JICAobGV0ICgocm93 IG5pbCkpCi0JICAgIChpZiAobG9va2luZy1hdCAiLSIpCi0JCShwdXNoICdobGluZSB0YWJs ZSkKLQkgICAgICAod2hpbGUgKG5vdCAocHJvZ24gKHNraXAtY2hhcnMtZm9yd2FyZCAiIFx0 IikgKGVvbHApKSkKLQkJKHB1c2ggKGJ1ZmZlci1zdWJzdHJpbmcKLQkJICAgICAgIChwb2lu dCkKLQkJICAgICAgIChwcm9nbiAocmUtc2VhcmNoLWZvcndhcmQgIlsgXHRdKlxcKHxcXHwk XFwpIikKLQkJCSAgICAgIChtYXRjaC1iZWdpbm5pbmcgMCkpKQotCQkgICAgICByb3cpKQot CSAgICAgIChwdXNoIChucmV2ZXJzZSByb3cpIHRhYmxlKSkpCisgICAgICAobGV0ICh0YWJs ZSkKKyAgICAgICAgKHdoaWxlIChwcm9nbiAoc2tpcC1jaGFycy1mb3J3YXJkICIgXHQiKQor ICAgICAgICAgICAgICAgICAgICAgIChlcSAoZm9sbG93aW5nLWNoYXIpID98KSkKKwkgIChm b3J3YXJkLWNoYXIpCisJICAocHVzaAorCSAgIChpZiAoZXEgKGZvbGxvd2luZy1jaGFyKSA/ LSkKKwkgICAgICAgJ2hsaW5lCisJICAgICAobGV0IChyb3cpCisJICAgICAgICh3aGlsZSAo cHJvZ24KKyAgICAgICAgICAgICAgICAgICAgICAgIChza2lwLWNoYXJzLWZvcndhcmQgIiBc dCIpCisgICAgICAgICAgICAgICAgICAgICAgICAobm90IChlb2xwKSkpCisgICAgICAgICAg ICAgICAgIChsZXQgKChxIChwb2ludCkpKQorICAgICAgICAgICAgICAgICAgIChza2lwLWNo YXJzLWZvcndhcmQgIl58XG4iKQorICAgICAgICAgICAgICAgICAgIChnb3RvLWNoYXIKKyAg ICAgICAgICAgICAgICAgICAgKHByb2cxCisgICAgICAgICAgICAgICAgICAgICAgICAobGV0 ICgocCAocG9pbnQpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgKHVubGVzcyAoZW9s cCkgKHNldHEgcCAoMSsgcCkpKQorICAgICAgICAgICAgICAgICAgICAgICAgICBwKQorCSAg ICAgICAgICAgICAgKHNraXAtY2hhcnMtYmFja3dhcmQgIiBcdCIgcSkKKwkgICAgICAgICAg ICAgIChwdXNoIChidWZmZXItc3Vic3RyaW5nLW5vLXByb3BlcnRpZXMgcSAocG9pbnQpKSBy b3cpKSkpKQorCSAgICAgICAobnJldmVyc2Ugcm93KSkpCisJICAgdGFibGUpCiAJICAoZm9y d2FyZC1saW5lKSkKLSAgICAgICAgKG5yZXZlcnNlIHRhYmxlKSkpKSkKKwkobnJldmVyc2Ug dGFibGUpKSkpKQogCiAoZGVmdW4gb3JnLXRhYmxlLWNvbGxhcHNlLWhlYWRlciAodGFibGUg Jm9wdGlvbmFsIHNlcGFyYXRvciBtYXgtaGVhZGVyLWxpbmVzKQogICAiQ29sbGFwc2UgdGhl IGxpbmVzIGJlZm9yZSBgaGxpbmUnIGludG8gYSBzaW5nbGUgaGVhZGVyLgotLSAKMi4zNC4x Cgo= --------------SrifKQxsmEM8GU09mXcae0Aw--