From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 13174800C7 for ; Thu, 19 Jan 2017 18:02:52 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=hez@0ok.org; spf=None smtp.mailfrom=hez@0ok.org; spf=None smtp.helo=postmaster@homiemail-a69.g.dreamhost.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of hez@0ok.org) identity=pra; client-ip=208.113.200.129; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="hez@0ok.org"; x-sender="hez@0ok.org"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of hez@0ok.org) identity=mailfrom; client-ip=208.113.200.129; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="hez@0ok.org"; x-sender="hez@0ok.org"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@homiemail-a69.g.dreamhost.com) identity=helo; client-ip=208.113.200.129; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="hez@0ok.org"; x-sender="postmaster@homiemail-a69.g.dreamhost.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3A4PywWx34WRcZbAgFsmDT+DRfVm0co7zxezQtwd8Z?= =?us-ascii?q?seIQKvad9pjvdHbS+e9qxAeQG96Kt7QY0qGG4ujJYi8p2d65qncMcZhBBVcuqP?= =?us-ascii?q?49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6?= =?us-ascii?q?JvjvGo7Vks+7y/2+94fdbghMizexe7x/IAi5oQjSssQdnJdvJLs2xhbVuHVDZv?= =?us-ascii?q?5YxXlvJVKdnhb84tm/8Zt++ClOuPwv6tBNX7zic6s3UbJXAjImM3so5MLwrhnM?= =?us-ascii?q?URGP5noHXWoIlBdDHhXI4wv7Xpf1tSv6q/Z91SyHNsD4Ubw4RTKv5LpwRRT2lC?= =?us-ascii?q?kIKSI28GDPisxxkq1bpg6hpwdiyILQeY2ZKeZycr/Ycd4cWGFPXNteVzZZD4yz?= =?us-ascii?q?YYsADeoPM+hboYfguVUBsQCzChOwCO710DJEmmP60K883u88EQ/GxgsgH9cWvX?= =?us-ascii?q?jartv6KqYTXv62zKnJ1zrDb+5d1zDn5IPVbB0uu+uMXa5wcMbf1EIiEAPFgUuR?= =?us-ascii?q?qIH+Iz+V0ecNv3Kc7+p6WuKikmgqoBx/rDiow8cjkIjJhoQNx1DL9CV53IY1Jc?= =?us-ascii?q?CjR0JhfdGkF55QuieHPIV1WsMvW39ktDo5x7EcpJK3YSYHxI45yxLDd/CLaZWE?= =?us-ascii?q?7gznWeqJPzt0mHZodKi8ihuy60Ss1PDwW8eu3FtKoSdIlMTHuGoX2BzJ8MeHT+?= =?us-ascii?q?Nw/ke/1jaL0ADe8uFEIUcxlaraNZEhx6Q/lpsXsUjaBCD7mUH7gLWZdkk+5+eo?= =?us-ascii?q?8froba/jpp+cMI90kR3+Pr4ylcy4BOQ0KgkOX26F9uSgzLDv41H1TbZQgvErj6?= =?us-ascii?q?XUvorWKdoHqqKlGQNZz5gv5hKnAzejytsYnH0HLFxfeBKAiojkI1HOL+75DPqk?= =?us-ascii?q?n1islzRry+rBPr37DZXBNmLDn6v5fbZh905czxI+wsxF6JJRDrENOfbzWk7qtN?= =?us-ascii?q?zEFRI5KAy1w+P/CNpnzI8eWGSPArWYMKzIq1OI6PgvcKGwY9o0pj/7Y9ci+/nw?= =?us-ascii?q?hn84hURVKai30rMWZX21WPN8LBPdKVPoi9YHWUkQvxE1TKS+gVmLUDgVaWyzRK?= =?us-ascii?q?k8zjU2GIOoDMHIQYX705Kb2yLuVL1bdG1FC1mMWVKuP66NQesdImrGIsJzumQD?= =?us-ascii?q?Vv6mUYB3hkLmjxPz17cydrmcwSYfr5+2kYEtv+A=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0B1AABo8IBYbYHIcdBeGQEBAQEBAQEBA?= =?us-ascii?q?QEBBwEBAQEBFAEBAQEBAQEBAQEBBwEBAQEBgxQBAQEBAX+BCYNRinqPbwaBHZA?= =?us-ascii?q?BhSuCDCqFeAKCPxYBAQEBAQEBAQEBARILDQkIHzCCMxsBghoBAQEDASMdOQEEC?= =?us-ascii?q?wsEBwMKKgICIhIBBQEcBgESiHYFCA6jPD+MAoIlgw+HPAEBAQEBAQEBAQEBAQE?= =?us-ascii?q?BAQEBAQEBARUDBYYHhTKEdoJZgl6bSQGGYIsEkG6RKjKBFCYBggMIOhQFhh5zi?= =?us-ascii?q?TQBAQE?= X-IPAS-Result: =?us-ascii?q?A0B1AABo8IBYbYHIcdBeGQEBAQEBAQEBAQEBBwEBAQEBFAE?= =?us-ascii?q?BAQEBAQEBAQEBBwEBAQEBgxQBAQEBAX+BCYNRinqPbwaBHZABhSuCDCqFeAKCP?= =?us-ascii?q?xYBAQEBAQEBAQEBARILDQkIHzCCMxsBghoBAQEDASMdOQEECwsEBwMKKgICIhI?= =?us-ascii?q?BBQEcBgESiHYFCA6jPD+MAoIlgw+HPAEBAQEBAQEBAQEBAQEBAQEBAQEBARUDB?= =?us-ascii?q?YYHhTKEdoJZgl6bSQGGYIsEkG6RKjKBFCYBggMIOhQFhh5ziTQBAQE?= X-IronPort-AV: E=Sophos;i="5.33,254,1477954800"; d="scan'208,217";a="209996001" Received: from sub5.mail.dreamhost.com (HELO homiemail-a69.g.dreamhost.com) ([208.113.200.129]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 19 Jan 2017 18:02:50 +0100 Received: from homiemail-a69.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a69.g.dreamhost.com (Postfix) with ESMTP id 54ED248000B34 for ; Thu, 19 Jan 2017 09:02:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=0ok.org; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; s=0ok.org; bh=3UamOQ4qjocKOdvccisd3Y1v8Y4=; b=jzP fC0yS3sAUp41NwYfvC7Fpyw7HzLpPeHQjOPWU+Y577ahAlq4NEmP8Q/arrIde5Q9 rhLTFPBXnwq7aWsMvQbMJpUb+gxJdpaHzatcPksYltGUCOzSzs8CYRTFIkwtfJwe 5azjUq8rfBQJ8Ovnipm95r/2ujLm2YyYGUOKlktg= Received: from mail-vk0-f54.google.com (mail-vk0-f54.google.com [209.85.213.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: hez@0ok.org) by homiemail-a69.g.dreamhost.com (Postfix) with ESMTPSA id 355DB48000B33 for ; Thu, 19 Jan 2017 09:02:47 -0800 (PST) Received: by mail-vk0-f54.google.com with SMTP id k127so34566274vke.0 for ; Thu, 19 Jan 2017 09:02:47 -0800 (PST) X-Gm-Message-State: AIkVDXLMvfhlHB+G070riEwAeY/Ai2bm0mf/JMtFT5WgAmfyikdgrdJswa4IvK6cWfJT22kyKo+q2f7EsW+sGw== X-Received: by 10.237.58.41 with SMTP id n38mr8728651qte.134.1484845366377; Thu, 19 Jan 2017 09:02:46 -0800 (PST) MIME-Version: 1.0 References: <2B595CCC-1121-4C8C-8F5F-A235D3AB19BB@yahoo.com> <64e5fca1-a5da-9ff5-ad90-b23343d17360@bioquant.uni-heidelberg.de> In-Reply-To: From: "Hezekiah M. Carty" Date: Thu, 19 Jan 2017 17:02:35 +0000 X-Gmail-Original-Message-ID: Message-ID: To: Ivan Gotovchits , Alain Frisch Cc: Nils Becker , "caml-list@inria.fr" Content-Type: multipart/alternative; boundary=001a11413c129c1ec905467580d2 Subject: Re: [Caml-list] Ocaml optimizer pitfalls & work-arounds --001a11413c129c1ec905467580d2 Content-Type: text/plain; charset=UTF-8 On Thu, Jan 19, 2017 at 8:35 AM Ivan Gotovchits wrote: > On Thu, Jan 19, 2017 at 9:35 AM, Alain Frisch > wrote: > > (Another argument in favor of the status quo is that writing > "FloatArray.get a i" is syntactically heavier than "a.(i)". Interestingly, > I don't feel that the ability to write polymorphic code on arrays and apply > it to (unboxed) float arrays is considered as a very important property.) > > > This is not a big issue, as you can write: > > module Array = FloatArray > a.(i) > > and it resolve to a call to the FloatArray.get function, as x.(i) is a > syntactic sugar for `Array.get x i`. The same is true to bigarrays. This is > kind of a non-documented feature, though. > > > > -- Alain > > If we get https://github.com/ocaml/ocaml/pull/622 or https://github.com/ocaml/ocaml/pull/616 then it's even simpler since FloatArray could have or define its own specialized element access. Hez --001a11413c129c1ec905467580d2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Thu, Jan 19= , 2017 at 8:35 AM Ivan Gotovchits <ivg@i= eee.org> wrote:
On Thu, Jan 19, 2017 at 9:35 AM, Alain Frisch <alain.frisch@lexifi.com><= /span> wrote:
(Another argument in favor of the status quo is that writing "FloatArr= ay.get a i" is syntactically heavier than "a.(i)". Interesti= ngly, I don't feel that the ability to write polymorphic code on arrays= and apply it to (unboxed) float arrays is considered as a very important p= roperty.)

This = =C2=A0is not a big issue, as you can write:
<= br class=3D"gmail_msg">
=C2=A0 =C2=A0 module = Array =3D FloatArray
=C2=A0 =C2=A0 a.(i)

and it resolve to a call to the FloatArray.get function, as x.(i) is = a syntactic sugar for `Array.get x i`. The same is true to bigarrays. This = is kind of a non-documented =C2=A0feature, though.=C2=A0
<= /div>

=C2=A0
-- Alain

=
If we get ht= tps://github.com/ocaml/ocaml/pull/622=C2=A0or=C2=A0https://github.com/ocaml/ocaml/pull/616= then it's even simpler since FloatArray could have or define its own s= pecialized element access.

Hez
--001a11413c129c1ec905467580d2--