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 D47037F787 for ; Tue, 8 Nov 2016 13:05:37 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=gmalecha@gmail.com; spf=Pass smtp.mailfrom=gmalecha@gmail.com; spf=None smtp.helo=postmaster@mail-vk0-f45.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of gmalecha@gmail.com) identity=pra; client-ip=209.85.213.45; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gmalecha@gmail.com"; x-sender="gmalecha@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of gmalecha@gmail.com designates 209.85.213.45 as permitted sender) identity=mailfrom; client-ip=209.85.213.45; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gmalecha@gmail.com"; x-sender="gmalecha@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-vk0-f45.google.com) identity=helo; client-ip=209.85.213.45; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gmalecha@gmail.com"; x-sender="postmaster@mail-vk0-f45.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AnyRZlhDzwW7JVtfnaAg4UyQJP3N1i/DPJgcQr6Af?= =?us-ascii?q?oPdwSP/5p8bcNUDSrc9gkEXOFd2CrakV0ayH7eu5CCQp2tWoiDg6aptCVhsI24?= =?us-ascii?q?09vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6kO74TNaIBjjLw09?= =?us-ascii?q?fr2zQd+IyZXpnLnjs7ToICxwzAKnZr1zKBjk5S7wjeIxxbVYF6Aq1xHSqWFJce?= =?us-ascii?q?kFjUlhJFaUggqurpzopM0roGxsvKcG88NPGfH9e6k3ZbtbCTUkdWcv65uv/RbK?= =?us-ascii?q?RxGO639aSW4WnwBFGSDK6Rj7WtH6tS6+/vt42S+BPtzeT7kyVC++9apmVFnjjy?= =?us-ascii?q?JDfzw72GDMkdFtyqlcpVbprBV6x8vQYZqJHPt4ZKLUO90AFkRbWcMEeDZMDYSm?= =?us-ascii?q?fsMqBu4MNuZR593yolIKoBC+DCGjAeruznlDgXqgjv5y6PgoDQyThF9oJNkJqn?= =?us-ascii?q?mB9Ng=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AjAABoviFYhy3VVdFdHQEFAQsBGAEFA?= =?us-ascii?q?QsBgwQBAQEBAXd/jTmXA4JgjFmFGoIIKYV7AoIVPxQBAQEBAQEBAQEBARIBAQE?= =?us-ascii?q?IDQkJHTCCMxiCFgEBAQIBARIRHQEbHgMBCwYDAgQHDSoCAiEBAREBBQEcBgESI?= =?us-ascii?q?ogfAQMPCA6UOY9NgTI/MotPggwGAS2DGgWDbgoZJw1UgxABAQgBAQEBAQEBGAI?= =?us-ascii?q?GEIUze4RXgkgcgTCDOIJcBZl6NYY2hleDO4I8jViJDYQjgkMxgRIPD4EaDQqDI?= =?us-ascii?q?iCBaD40hzoBAQE?= X-IPAS-Result: =?us-ascii?q?A0AjAABoviFYhy3VVdFdHQEFAQsBGAEFAQsBgwQBAQEBAXd?= =?us-ascii?q?/jTmXA4JgjFmFGoIIKYV7AoIVPxQBAQEBAQEBAQEBARIBAQEIDQkJHTCCMxiCF?= =?us-ascii?q?gEBAQIBARIRHQEbHgMBCwYDAgQHDSoCAiEBAREBBQEcBgESIogfAQMPCA6UOY9?= =?us-ascii?q?NgTI/MotPggwGAS2DGgWDbgoZJw1UgxABAQgBAQEBAQEBGAIGEIUze4RXgkgcg?= =?us-ascii?q?TCDOIJcBZl6NYY2hleDO4I8jViJDYQjgkMxgRIPD4EaDQqDIiCBaD40hzoBAQE?= X-IronPort-AV: E=Sophos;i="5.31,462,1473112800"; d="scan'208,217";a="199610189" Received: from mail-vk0-f45.google.com ([209.85.213.45]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 08 Nov 2016 13:05:36 +0100 Received: by mail-vk0-f45.google.com with SMTP id w194so146566544vkw.2 for ; Tue, 08 Nov 2016 04:05:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=2HPBqSqYHwru1OZHJ33BsRmBM31Y7bnnRi9NlR62LlI=; b=jWpy02wDvEKjD9KN9lsH/jLHN5MLl5h4HDzQDMT0HVR9CJO3G+FKgUMCd3y9Zewuy/ Mn0W0Ush46HWt5dhGHIxv5jafm9l7jSdk89oy9pIJoP18fIFT8kINTg5zmmohg/D1eGw HwQ4Oz+GvVX/FP3Sd8egA1B7d/DalISF5iwRG682A2YoLrdat3UFFdeYA3FK4qDBSsN/ degKN+FLtjkrhxhc15zwdlj4HDvyrmgHM93kh2GB8IqDdwBEc2N9H/k5B9UtQcH8BuZX PgcBqXoSM0zDdGGPzbgB0sMXOG3g62sINK8lUu1aQbDn53RklPi43Pc/7CKbTJzNMUHP 9aGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=2HPBqSqYHwru1OZHJ33BsRmBM31Y7bnnRi9NlR62LlI=; b=OlN/lTObyhBpJuOOs0S9fQcQ0Av6RWSFznZPtixb/nNbAdWnu8RKLvfLfxr/La+l0p WSarLMWvHTHOddiUcbb1fuztkLjrN/YY74Sb6B7QxfbJz4xFhgNS/tw1XCfHZ/yuO2R/ dkzIG3LTlhpU8/ABvycm2cH8pHLYL+bHUe11VklhCeACk81pF2xYjsgPLkt0EDhXU8lu zF+lqCnHyK61ZsPmpCMMe32wgL78JF5CPLsKfn0bc0qIlSRlpt7y+hbWijfK5GKPupka VfBpO0L9DQaX9DUTz7ODZ/X7Q0O73UVpcObLpuxsFP1DqDAjw98+R4uiYjKrw+zXVSrs cxog== X-Gm-Message-State: ABUngvcb71/eNJ9aRTIzXl1JbCiS05+XIMEXoY+sBF1wRTH1D3iIfCDh+sE0n94Yv6tjQpaV///rhPOHSi1IcA== X-Received: by 10.31.8.146 with SMTP id 140mr7650808vki.173.1478606735576; Tue, 08 Nov 2016 04:05:35 -0800 (PST) MIME-Version: 1.0 References: <20161108120716.GA6073@Magus.localnet> In-Reply-To: <20161108120716.GA6073@Magus.localnet> From: Gregory Malecha Date: Tue, 08 Nov 2016 12:05:24 +0000 Message-ID: To: Oleg , gabriel.scherer@gmail.com, yminsky@janestreet.com, jj@issuu.com, caml-list@inria.fr Content-Type: multipart/alternative; boundary=001a1144fa123c929e0540c8f584 Subject: Re: [Caml-list] The fastest stream library [Was: Question about Optimization] --001a1144fa123c929e0540c8f584 Content-Type: text/plain; charset=UTF-8 Thanks. This is interesting, I'll have to take a closer look at it. On Tue, Nov 8, 2016, 7:01 AM Oleg wrote: > > > On 21 April 2016 at 09:13, Gregory Malecha wrote: > > I'm wondering if there is any work (and interest) on supporting > > user-defined optimizations similar to GHC's rewrite rules in the Ocaml > > compiler. For example, a standard example would be specifying map fusion: > > to which Gabriel Scherer commented on Thu, 21 Apr 2016 12:02:14 -0400 > > > Another approach that might be worth trying (sorry for not thinking > > about it earlier) is MetaOCaml. I tend of think of it as a tool to > > explicitly specify and control partial evaluation strategies. > > Indeed. We'd like to point out an application of MetaOCaml, not just > to map fusion -- but also concat_map fusion and zip fusion, etc. We > present a streams library that supports the wide set of combinators -- > from map and filter to concat_map (flat_map) and zip -- and produces > the hand-written quality code. It is faster than Batteries by up to more > than two orders of magnitude. > > http://okmij.org/ftp/meta-programming/strymonas.pdf > http://strymonas.github.io/ > > Unlike GHC Rules, we guarantee the performance. > -- - gregory malecha gmalecha.github.io --001a1144fa123c929e0540c8f584 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Thanks. This is interesting, I'll have to take a closer = look at it.


On Tue, Nov 8, 2016, 7:01 A= M Oleg <oleg@okmij.org> wrote:<= br>

> On 21 April 2016 at 09:13, Gregory Malecha <gmalecha@gmail.com= > wrote:
> I'm wondering if there is any work (and interest) on supporting > user-defined optimizations similar to GHC's rewrite rules in the O= caml
> compiler. For example, a standard example would be specifying map fusi= on:

to which Gabriel Scherer commented on Thu, 21 Apr 2016 12:02:14 -0400

> Another approach that might be worth trying (sorry for not thinking > about it earlier) is MetaOCaml. I tend of think of it as a tool to
> explicitly specify and control partial evaluation strategies.

Indeed. We'd like to point out an application of MetaOCaml, not just to map fusion -- but also concat_map fusion and zip fusion, etc. We
present a streams library that supports the wide set of combinators --
from map and filter to concat_map (flat_map) and zip -- and produces
the hand-written quality code. It is faster than Batteries by up to more than two orders of magnitude.

=C2=A0 =C2=A0 =C2=A0 =C2=A0 h= ttp://okmij.org/ftp/meta-programming/strymonas.pdf
=C2=A0 =C2=A0 =C2=A0 =C2=A0 http://strymonas.github.i= o/

Unlike GHC Rules, we guarantee the performance.
--

- gregory malecha
=C2=A0 gmalecha.github.io

--001a1144fa123c929e0540c8f584--