From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Boyer Newsgroups: gmane.emacs.devel Subject: Some thoughts about Emacs performance Date: Wed, 7 Feb 2024 23:44:38 -0600 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000db27ca0610d85031" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33853"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 08 08:16:02 2024 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 1rXydc-0008by-GZ for ged-emacs-devel@m.gmane-mx.org; Thu, 08 Feb 2024 08:16:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXyd5-0008Lj-E1; Thu, 08 Feb 2024 02:15:27 -0500 Original-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 1rXxDs-0001sf-0F for emacs-devel@gnu.org; Thu, 08 Feb 2024 00:45:20 -0500 Original-Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rXxDq-0004wd-2E for emacs-devel@gnu.org; Thu, 08 Feb 2024 00:45:19 -0500 Original-Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-56113a537c9so58044a12.2 for ; Wed, 07 Feb 2024 21:45:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707371116; x=1707975916; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=EjLufGl1XOQlbuTKVvXWBglQv+IPRy6u3GZXhX9AkjI=; b=bIjejrISdT9twu9gdYHhGPogxNgrrANUnhJO1tYzSK69TUMINDN34n1kBQcNd4prH/ qkx+D9iYm9FUZFuqXqw8pVgxe88BJz/WVUGiTc9DWzZITY6cYOuCz2GzuviMyOd7fmTY +sm+HkI/iT8ZG4Lp1Y5vYiBVtlv+Y4z98bFMN58OJ8z8vOR57Q5K3lU7mTB3twpA5SHl zVIOfog/h5BcPyYPavjunwmu/+UMQZYwfHZtliSTyIKO5HwMzFv1fV6Gp0d4vA4T46WK IZMXAt+NAgbXffH1FsbJGCbLtmS7JW8DNzoSBoEQvbNloDzLfKb3NqtTmiE9M4rMrdaS NNgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707371116; x=1707975916; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=EjLufGl1XOQlbuTKVvXWBglQv+IPRy6u3GZXhX9AkjI=; b=oMRWLmXjtaLg0/bNMsdzh4LhsNDMbPELrd5mcxPGaVg26Aw0yypb3XoOlAo4aiSBDA Xd5nwcvy8mcfCCNPAp1Ja7bsqH60Flnyj5fFsNq5kp+ee2DZ8edayBGwUTcNdY4fWubX ukbBjcFBidP6Qvy0wZYOqB+AlvawOR3qsw0CMxVp4gyE5AaZYi8KFMhvPOF3UaSdFjCs 1ZbdlDywHWLVIjxWpw1LJzsiRDP/B+Pse8HziUQNR+J9akiCIs60hMG1fpeBi0sBKoG6 TRfbXUUcH/pHMdqKkAy1/YVqjdYQOpEyvF/GZMx4rcYHozQ3+Gtf5T1rOXKn/Zst6n2T h1ow== X-Gm-Message-State: AOJu0YzT7VQoJHzWz6Vsa9KzlkU64uwaCzP/BVb7htM36v+fY58mcM8r v14bn1W7N3kHi0s+RtubjUSHzoau1ggU+itEyQTRY/82NGZ8mAty3zpF2ms2K1i18FzPt7ekYnQ 21RmG8dlbiOJiYiabXeH3b9huoFswfi0fcps= X-Google-Smtp-Source: AGHT+IH5cowHmTBbc35K3Bqtr4K8DQVFUDU4fDu9E77p/30gpEVV4VppMXlvFGM2MMy12E2QhbSabTLGiAuKAHBgw/Q= X-Received: by 2002:a05:6402:1acc:b0:55f:cef0:5fe7 with SMTP id ba12-20020a0564021acc00b0055fcef05fe7mr5603405edb.0.1707371115777; Wed, 07 Feb 2024 21:45:15 -0800 (PST) Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=robertstephenboyer@gmail.com; helo=mail-ed1-x530.google.com 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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-Mailman-Approved-At: Thu, 08 Feb 2024 02:15:16 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:316022 Archived-At: --000000000000db27ca0610d85031 Content-Type: multipart/alternative; boundary="000000000000db27c90610d8502f" --000000000000db27c90610d8502f Content-Type: text/plain; charset="UTF-8" Emacs 27.1 has a 'sort' function that takes longer than stable-sort of SBCL. Maybe by a factor of 2. See also my attached file 'ms.lisp'. There may be a lot that can be improved in Emacs' handling of cl-loop, setf, elt, or cl-random. ;; First some Emacs, with times on my $100 Chromebook. (setq n 6) (defun make-random-array (n) (let ((a (make-vector n 0))) (cl-loop for i below n do (setf (elt a i) (cl-random 1000000))) a)) (byte-compile 'make-random-array) (benchmark '(setq foo (make-random-array (expt 10 n))) 1) -- 2.3 seconds (benchmark '(sort foo '<) 1) -- 1 second ;; Second some Common Lisp, with times for SBCL on my $100 Chromebook. (defparameter n 6) (defun make-random-array (n) (declare (fixnum n)) (let ((a (make-array n))) (declare (type array a)) (loop for i fixnum below n do (setf (aref a i) (random most-positive-fixnum))) a)) (time (defparameter foo (make-random-array (expt 10 n)))) -- .041 seconds (time (progn (stable-sort foo '<) nil)) -- .45 seconds Thanks so much for Emacs, which is so great that I cannot put it into words. Bob --000000000000db27c90610d8502f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Emacs 27.1 has a 'sort' f= unction that takes longer than stable-sort of SBCL. Maybe
by a factor of 2. See also my attached file 'ms.lisp= '.

There may be a lot that can be improved in Emacs'<= /font>
handling of cl-loop, setf, elt, o= r cl-random.

;; First some Emacs, with times on my $100 Chromebook.<= br>
(setq n 6)
(defun make-random-array (n)
=C2=A0 (let ((a= (make-vector n 0)))
=C2=A0 =C2=A0 (cl-loop for i below n do
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(setf (elt a i) (cl-random 1000000= )))
=C2=A0 =C2=A0 a))
(byte-compile 'make-random-array)
(bench= mark '(setq foo (make-random-array (expt 10 n))) 1) -- 2.3 seconds
(= benchmark '(sort foo '<) 1) -- 1 second

;; Second some Common Lisp, with times for SBCL on my $100 Chromebo= ok.

(defparameter n 6)
(defun make-random-array (n)
=C2=A0 (de= clare (fixnum n))
=C2=A0 (let ((a (make-array n)))
=C2=A0 =C2=A0 (dec= lare (type array a))
=C2=A0 =C2=A0 (loop for i fixnum below n do
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (setf (aref a i) (random most-positive-fixn= um)))
=C2=A0 =C2=A0 a))
(time (defparameter foo (make-random-array (e= xpt 10 n)))) =C2=A0-- .041 seconds
(time (progn (stable-sort foo '&l= t;) nil)) -- .45 seconds

Thanks so much for Emacs, which is so grea= t that I cannot put it
into words= .

Bob

--000000000000db27c90610d8502f-- --000000000000db27ca0610d85031 Content-Type: application/octet-stream; name="ms.lisp" Content-Disposition: attachment; filename="ms.lisp" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lscskdcw0 OyAtKi0gY29kaW5nOiB1dGYtOCAtKi0KCjs7OyBtcy5saXNwIHdhcyBjb2RlZCBieSBSb2JlcnQg Uy4gQm95ZXIsIHJvYmVyc3RlcGhlbmJveWVyQGdtYWlsLmNvbSwgaW4KOzs7IDIwMjQuIG1zLmxp c3AgaXMgcHVibGljIGRvbWFpbi4gSXQgcnVucyBpbiBTQkNMLiAgVGhlIG1haW4gZnVuY3Rpb24K Ozs7IGluIG1zLmxpc3AgaXMgbXNhLCB3aGljaCBpcyBzaW1wbHkgZ29vZCBvbGQgbWVyZ2Ugc29y dC4KCjs7OyBtcy5saXNwIGlzCjs7OyBodHRwczovL2RyaXZlLmdvb2dsZS5jb20vZmlsZS9kLzFP RVlxYzd3bUdqVXRqN0hoeV8zUW1PUzIzeUo0SXphZi92aWV3P3VzcD1zaGFyaW5nCgo7OzsgQ29u c2lkZXIgc29ydGluZyBhbiBhcnJheSBvZiAxMCBtaWxsaW9uIHJhbmRvbSByYXRpb25hbHMgYW5k IGZsb2F0cy4KCjs7OyBtc2EgICAgICAgICB0YWtlcyAzNy4wODIgIHJlYWwgc2Vjb25kcy4KOzs7 IHN0YWJsZS1zb3J0IHRha2VzIDY5LjMyMSAgcmVhbCBzZWNvbmRzLgo7Ozsgc29ydCAgICAgICAg dGFrZXMgMTEwLjA0NyByZWFsIHNlY29uZHMuCgo7OzsgVGhlIGFib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CiAgICAgICAgICAoKD0gZW5k LXN0YXJ0IDIpCiAgICAgICAgICAgKGxldCAoKGFzLXN0YXJ0IChzdnJlZiBtc2EtaW5wdXQgc3Rh cnQpKQogICAgICAgICAgICAgICAgIChhcy1zdGFydCsxIChzdnJlZiBtc2EtaW5wdXQgc3RhcnQr MSkpKQogICAgICAgICAgICAgKGRlY2xhcmUgKHJhdGlvbmFsLW9yLWZsb2F0IGFzLXN0YXJ0IGFz LXN0YXJ0KzEpKQogICAgICAgICAgICAgKGNvbmQgKChteS08IGFzLXN0YXJ0KzEgYXMtc3RhcnQp CiAgICAgICAgICAgICAgICAgICAgKHNldGYgKHN2cmVmIG1zYS1pbnB1dCBzdGFydCkgYXMtc3Rh cnQrMSkKICAgICAgICAgICAgICAgICAgICAoc2V0ZiAoc3ZyZWYgbXNhLWlucHV0IHN0YXJ0KzEp IGFzLXN0YXJ0KSkpKSkKICAgICAgICAgICh0IChsZXQgKChtaWQgKHRoZSBmaXhudW0gKCsgc3Rh cnQgKHRoZSBmaXhudW0gKGZsb29yIGVuZC1zdGFydCAyKSkpKSkpCiAgICAgICAgICAgICAgIChk ZWNsYXJlIChmaXhudW0gbWlkKSkKICAgICAgICAgICAgICAgKGNvbmQgKCg9IHN0YXJ0KzEgbWlk KSkKICAgICAgICAgICAgICAgICAgICAgKHQgKG1zYS0xIHN0YXJ0IG1pZCkpKQogICAgICAgICAg ICAgICAobXNhLTEgbWlkIGVuZCkKICAgICAgICAgICAgICAgKGxldCAoKGkwIHN0YXJ0KSAoaTEg bWlkKSAoZW5kMCBtaWQpIChlbmQxIGVuZCkpCiAgICAgICAgICAgICAgICAgKGRlY2xhcmUgKGZp eG51bSBpMCBpMSBlbmQwIGVuZDEpKQogICAgICAgICAgICAgICAgIChsb29wIGZvciBzaSBmaXhu dW0gYmVsb3cgZW5kLXN0YXJ0IGRvCiAgICAgICAgICAgICAgICAgICAgICAgKGNvbmQgKCg9IGkw IGVuZDApCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzZXRmIChzdnJlZiBtc2Etc2Ny YXRjaCBzaSkgKHN2cmVmIG1zYS1pbnB1dCBpMSkpCiAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIChpbmNmIGkxKSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaTEgZW5kMSkK ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHNldGYgKHN2cmVmIG1zYS1zY3JhdGNoIHNp KSAoc3ZyZWYgbXNhLWlucHV0IGkwKSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGlu Y2YgaTApKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICgobXktPCAodGhlIHJhdGlvbmFs LW9yLWZsb2F0IChzdnJlZiBtc2EtaW5wdXQgaTApKQogICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAodGhlIHJhdGlvbmFsLW9yLWZsb2F0IChzdnJlZiBtc2EtaW5wdXQgaTEpKSkK ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHNldGYgKHN2cmVmIG1zYS1zY3JhdGNoIHNp KSAoc3ZyZWYgbXNhLWlucHV0IGkwKSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGlu Y2YgaTApKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0IChzZXRmIChzdnJlZiBtc2Et c2NyYXRjaCBzaSkgKHN2cmVmIG1zYS1pbnB1dCBpMSkpCiAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKGluY2YgaTEpKSkpKQogICAgICAgICAgICAgICAobG9vcCBmb3IgaSBmaXhudW0g YmVsb3cgZW5kLXN0YXJ0IGFzIGogZml4bnVtIGZyb20gc3RhcnQgZG8KICAgICAgICAgICAgICAg ICAgICAgKHNldGYgKHN2cmVmIG1zYS1pbnB1dCBqKSAoc3ZyZWYgbXNhLXNjcmF0Y2ggaSkpKSkp KQogICAgbmlsKSkKCihkZWZ1biBtc2EtMS1maXhudW0gKHN0YXJ0IGVuZCkKICAoZGVjbGFyZSAo Zml4bnVtIHN0YXJ0IGVuZCkpCiAgKGxldCAoKHN0YXJ0KzEgKHRoZSBmaXhudW0gKDErIHN0YXJ0 KSkpCiAgICAgICAgKGVuZC1zdGFydCAodGhlIGZpeG51bSAoLSBlbmQgc3RhcnQpKSkpCiAgICAo ZGVjbGFyZSAoZml4bnVtIHN0YXJ0KzEgZW5kLXN0YXJ0KSkKICAgIChjb25kICgob3IgKD0gc3Rh cnQgZW5kKSAoPSBzdGFydCsxIGVuZCkpKQogICAgICAgICAgKCg9IGVuZC1zdGFydCAyKQogICAg ICAgICAgIChsZXQgKChhcy1zdGFydCAoc3ZyZWYgbXNhLWlucHV0IHN0YXJ0KSkKICAgICAgICAg ICAgICAgICAoYXMtc3RhcnQrMSAoc3ZyZWYgbXNhLWlucHV0IHN0YXJ0KzEpKSkKICAgICAgICAg ICAgIChkZWNsYXJlIChmaXhudW0gYXMtc3RhcnQgYXMtc3RhcnQrMSkpCiAgICAgICAgICAgICAo Y29uZCAoKDwgYXMtc3RhcnQrMSBhcy1zdGFydCkKICAgICAgICAgICAgICAgICAgICAoc2V0ZiAo c3ZyZWYgbXNhLWlucHV0IHN0YXJ0KSBhcy1zdGFydCsxKQogICAgICAgICAgICAgICAgICAgIChz ZXRmIChzdnJlZiBtc2EtaW5wdXQgc3RhcnQrMSkgYXMtc3RhcnQpKSkpKQogICAgICAgICAgKHQg KGxldCAoKG1pZCAodGhlIGZpeG51bSAoKyBzdGFydCAodGhlIGZpeG51bSAoZmxvb3IgZW5kLXN0 YXJ0IDIpKSkpKSkKICAgICAgICAgICAgICAgKGRlY2xhcmUgKGZpeG51bSBtaWQpKQogICAgICAg ICAgICAgICAoY29uZCAoKD0gc3RhcnQrMSBtaWQpKQogICAgICAgICAgICAgICAgICAgICAodCAo bXNhLTEtZml4bnVtIHN0YXJ0IG1pZCkpKQogICAgICAgICAgICAgICAobXNhLTEtZml4bnVtIG1p ZCBlbmQpCiAgICAgICAgICAgICAgIChsZXQgKChpMCBzdGFydCkgKGkxIG1pZCkgKGVuZDAgbWlk KSAoZW5kMSBlbmQpKQogICAgICAgICAgICAgICAgIChkZWNsYXJlIChmaXhudW0gaTAgaTEgZW5k MCBlbmQxKSkKICAgICAgICAgICAgICAgICAobG9vcCBmb3Igc2kgZml4bnVtIGJlbG93IGVuZC1z dGFydCBkbwogICAgICAgICAgICAgICAgICAgICAgIChjb25kICgoPSBpMCBlbmQwKQogICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAoc2V0ZiAoc3ZyZWYgbXNhLXNjcmF0Y2ggc2kpIChzdnJl ZiBtc2EtaW5wdXQgaTEpKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaW5jZiBpMSkp CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkxIGVuZDEpCiAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIChzZXRmIChzdnJlZiBtc2Etc2NyYXRjaCBzaSkgKHN2cmVmIG1zYS1p bnB1dCBpMCkpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpbmNmIGkwKSkKICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAoKDwgKHRoZSBmaXhudW0gKHN2cmVmIG1zYS1pbnB1dCBp MCkpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0aGUgZml4bnVtIChzdnJlZiBt c2EtaW5wdXQgaTEpKSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHNldGYgKHN2cmVm IG1zYS1zY3JhdGNoIHNpKSAoc3ZyZWYgbXNhLWlucHV0IGkwKSkKICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKGluY2YgaTApKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0IChz ZXRmIChzdnJlZiBtc2Etc2NyYXRjaCBzaSkgKHN2cmVmIG1zYS1pbnB1dCBpMSkpCiAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKGluY2YgaTEpKSkpKQogICAgICAgIC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CAyKSkpKSkpCiAgICAgICAgICAgICAgIChkZWNsYXJlIChmaXhudW0g bWlkKSkKICAgICAgICAgICAgICAgKGNvbmQgKCg9IHN0YXJ0KzEgbWlkKSkKICAgICAgICAgICAg ICAgICAgICAgKHQgKG1zYS0xLWZsb2F0IHN0YXJ0IG1pZCkpKQogICAgICAgICAgICAgICAobXNh LTEtZmxvYXQgbWlkIGVuZCkKICAgICAgICAgICAgICAgKGxldCAoKGkwIHN0YXJ0KSAoaTEgbWlk KSAoZW5kMCBtaWQpIChlbmQxIGVuZCkpCiAgICAgICAgICAgICAgICAgKGRlY2xhcmUgKGZpeG51 bSBpMCBpMSBlbmQwIGVuZDEpKQogICAgICAgICAgICAgICAgIChsb29wIGZvciBzaSBmaXhudW0g YmVsb3cgZW5kLXN0YXJ0IGRvCiAgICAgICAgICAgICAgICAgICAgICAgKGNvbmQgKCg9IGkwIGVu ZDApCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzZXRmIChzdnJlZiBtc2Etc2NyYXRj aCBzaSkgKHN2cmVmIG1zYS1pbnB1dCBpMSkpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IChpbmNmIGkxKSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaTEgZW5kMSkKICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKHNldGYgKHN2cmVmIG1zYS1zY3JhdGNoIHNpKSAo c3ZyZWYgbXNhLWlucHV0IGkwKSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGluY2Yg aTApKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPCAodGhlIGZsb2F0IChzdnJlZiBt c2EtaW5wdXQgaTApKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodGhlIGZsb2F0 IChzdnJlZiBtc2EtaW5wdXQgaTEpKSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHNl dGYgKHN2cmVmIG1zYS1zY3JhdGNoIHNpKSAoc3ZyZWY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IGkgZml4bnVtIGJlbG93IGxlbiBkbwogICAgICAgICAgKGxldCAoKHggKGFyZWYg YXIgaSkpKQogICAgICAgICAgICAoY29uZCAoKG5vdCAodHlwZXAgeCAncmF0aW9uYWwtb3ItZmxv YXQpKQogICAgICAgICAgICAgICAgICAgKGVycm9yICJhciB0YWtlcyBhbiBhcnJheSBvZiByYXRp b25hbHMgb3IgZmxvYXRzLiIpKQogICAgICAgICAgICAgICAgICAoKG5vdCAodHlwZXAgeCAnZml4 bnVtKSkgKHNldHEgYWxsLWZpeG51bSBuaWwpKQogICAgICAgICAgICAgICAgICAoKG5vdCAodHlw ZXAgeCAnZmxvYXQpKSAoc2V0cSBhbGwtZmxvYXQgbmlsKSkpKSkKICAgIChjb25kICgodHlwZXAg YXIgJ3NpbXBsZS12ZWN0b3IpCiAgICAgICAgICAgKHNldHEgbXNhLWlucHV0IGFyKSkKICAgICAg ICAgICh0IChzZXRxIG1zYS1pbnB1dCAoY29weS1zZXEgbXNhLWlucHV0KSkpKQogICAgKHNldHEg bXNhLXNjcmF0Y2ggKG1ha2UtYXJyYXkgbGVuKSkKICAgIChjb25kIChhbGwtZml4bnVtCiAgICAg ICAgICAgOzsgKGZvcm1hdCB0ICJ+JW1zYS0xLWZpeG51bS4iKQogICAgICAgICAgIChtc2EtMS1m aXhudW0gMCBsZW4pKQogICAgICAgICAgKGFsbC1mbG9hdAogICAgICAgICAgIDs7IChmb3JtYXQg dCAifiVtc2EtMS1mbG9hdC4iKQogICAgICAgICAgIChtc2EtMS1mbG9hdCAwIGxlbikpCiAgICAg ICAgICAodCAobXNhLTEgMCBsZW4pKSkKICAgIChjb25kICgodHlwZXAgYXIgJ3NpbXBsZS12ZWN0 b3IpKQogICAgICAgICAgKHQgKGxvb3AgZm9yIGkgYmVsb3cgbGVuIGRvCiAgICAgICAgICAgICAg ICAgICAoc2V0ZiAoYXJlZiBhciBpKSAoc3ZyZWYgbXNhLWlucHV0IGkpKSkpKQogICAgKHNldHEg bXNhLWluc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