From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Qiantan Hong Newsgroups: gmane.emacs.devel Subject: Re: beginners elisp question - parallel execution Date: Tue, 17 Nov 2020 20:19:10 +0000 Message-ID: <6C49FA23-5819-41EB-A199-53C4EF852BD3@mit.edu> References: <565010363.4200.1605636101522@office.mailbox.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Apple-Mail=_FFDEEE7B-783A-4670-A0E1-35477D1AD221"; protocol="application/pkcs7-signature"; micalg=sha-256 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30015"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "emacs-devel@gnu.org" To: "simon254@mailbox.org" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 17 21:20:12 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kf7SW-0007fx-DH for ged-emacs-devel@m.gmane-mx.org; Tue, 17 Nov 2020 21:20:12 +0100 Original-Received: from localhost ([::1]:53688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kf7SV-0000on-FY for ged-emacs-devel@m.gmane-mx.org; Tue, 17 Nov 2020 15:20:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47780) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kf7Rq-0000Gt-3e for emacs-devel@gnu.org; Tue, 17 Nov 2020 15:19:30 -0500 Original-Received: from outgoing-exchange-1.mit.edu ([18.9.28.15]:50439) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kf7Ro-00061y-62 for emacs-devel@gnu.org; Tue, 17 Nov 2020 15:19:29 -0500 Original-Received: from oc11exedge2.exchange.mit.edu (OC11EXEDGE2.EXCHANGE.MIT.EDU [18.9.3.18]) by outgoing-exchange-1.mit.edu (8.14.7/8.12.4) with ESMTP id 0AHKJ5xo019587; Tue, 17 Nov 2020 15:19:22 -0500 Original-Received: from oc11expo16.exchange.mit.edu (18.9.4.47) by oc11exedge2.exchange.mit.edu (18.9.3.18) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Tue, 17 Nov 2020 15:19:04 -0500 Original-Received: from oc11expo16.exchange.mit.edu (18.9.4.47) by oc11expo16.exchange.mit.edu (18.9.4.47) with Microsoft SMTP Server (TLS) id 15.0.1365.1; Tue, 17 Nov 2020 15:19:10 -0500 Original-Received: from oc11expo16.exchange.mit.edu ([18.9.4.47]) by oc11expo16.exchange.mit.edu ([18.9.4.47]) with mapi id 15.00.1365.000; Tue, 17 Nov 2020 15:19:10 -0500 Thread-Topic: beginners elisp question - parallel execution Thread-Index: AQHWvRBhoIcWIuKPbUyRRmwnlKiaRqnNF4EA In-Reply-To: <565010363.4200.1605636101522@office.mailbox.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [18.18.245.17] Received-SPF: pass client-ip=18.9.28.15; envelope-from=qhong@mit.edu; helo=outgoing-exchange-1.mit.edu X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/17 15:19:23 X-ACL-Warn: Detected OS = Windows 7 (Websense crawler) X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:259311 Archived-At: --Apple-Mail=_FFDEEE7B-783A-4670-A0E1-35477D1AD221 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I think the =E2=80=99side-effect-free symbol property does this. > On Nov 17, 2020, at 1:01 PM, simon254@mailbox.org wrote: >=20 > Hi, >=20 > sorry if this is a very dumb question: >=20 > in the past there were discussions about multi threading in emacs. My = impression is that where most of a performance gain like this would be = useful is for e.g. computing fuzzy scores for a long list of candidates = or similar things.=20 >=20 > Would it be possible to introduce something like pure functions in = fortran too elisp? I.e. functions that are not allowed to have side = effects and for example act only on one list element? This could then be = given to a new "number crunching" routine (mapcar_para?) which applies = them in parallel to a list (via openmp or whatever)? Or is the concept = already flawed?=20 >=20 > Again, sorry if this is dumb, >=20 > Simon >=20 --Apple-Mail=_FFDEEE7B-783A-4670-A0E1-35477D1AD221 Content-Disposition: attachment; filename="smime.p7s" Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCCA70w ggO5MIIDIqADAgECAhAaql39NsO1qLVjkS2hl517MA0GCSqGSIb3DQEBCwUAMGwxCzAJBgNVBAYT AlVTMRYwFAYDVQQIEw1NYXNzYWNodXNldHRzMS4wLAYDVQQKEyVNYXNzYWNodXNldHRzIEluc3Rp dHV0ZSBvZiBUZWNobm9sb2d5MRUwEwYDVQQLEwxDbGllbnQgQ0EgdjEwHhcNMjAwODAzMDEyNDIz WhcNMjEwODAxMDEyNDIzWjCBoTELMAkGA1UEBhMCVVMxFjAUBgNVBAgTDU1hc3NhY2h1c2V0dHMx LjAsBgNVBAoTJU1hc3NhY2h1c2V0dHMgSW5zdGl0dXRlIG9mIFRl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