caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Hezekiah M. Carty" <hez@0ok.org>
To: Ivan Gotovchits <ivg@ieee.org>, Alain Frisch <alain.frisch@lexifi.com>
Cc: Nils Becker <nils.becker@bioquant.uni-heidelberg.de>,
	 "caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] Ocaml optimizer pitfalls & work-arounds
Date: Thu, 19 Jan 2017 17:02:35 +0000	[thread overview]
Message-ID: <CAMfPyLDWK1JBPsSzO7HrONDxs_K0Q11PoUHCEAXaJKa+kqso8g@mail.gmail.com> (raw)
In-Reply-To: <CALdWJ+wULRf4k+xtUCP3Tq6e9ohKVG=4TC435HB9MZE3B+f3Eg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 960 bytes --]

On Thu, Jan 19, 2017 at 8:35 AM Ivan Gotovchits <ivg@ieee.org> wrote:

> On Thu, Jan 19, 2017 at 9:35 AM, Alain Frisch <alain.frisch@lexifi.com>
> 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

[-- Attachment #2: Type: text/html, Size: 2664 bytes --]

  reply	other threads:[~2017-01-19 17:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-19  6:51 Mark Hayden
2017-01-19 11:20 ` Nils Becker
2017-01-19 11:39   ` Gabriel Scherer
2017-01-19 13:26     ` Frédéric Bour
2017-01-19 14:35   ` Alain Frisch
2017-01-19 15:35     ` Ivan Gotovchits
2017-01-19 17:02       ` Hezekiah M. Carty [this message]
2017-01-19 15:41     ` Gerd Stolpmann
2017-01-19 13:41 ` Yaron Minsky
2017-01-19 17:59   ` Mark Hayden
2017-01-19 22:30     ` Yaron Minsky
2017-01-22 20:06       ` Berke Durak
2017-01-23 16:33         ` David McClain
2017-01-21 14:39 ` [Caml-list] <DKIM> " Pierre Chambart
2017-01-19 14:32 [Caml-list] " Hongbo Zhang (BLOOMBERG/ 731 LEX)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMfPyLDWK1JBPsSzO7HrONDxs_K0Q11PoUHCEAXaJKa+kqso8g@mail.gmail.com \
    --to=hez@0ok.org \
    --cc=alain.frisch@lexifi.com \
    --cc=caml-list@inria.fr \
    --cc=ivg@ieee.org \
    --cc=nils.becker@bioquant.uni-heidelberg.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).