From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 37B7E7F787 for ; Tue, 8 Nov 2016 13:01:52 +0100 (CET) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=oleg@okmij.org; spf=Pass smtp.mailfrom=oleg@okmij.org; spf=None smtp.helo=postmaster@mail1.g3.pair.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of oleg@okmij.org) identity=pra; client-ip=66.39.3.114; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="oleg@okmij.org"; x-sender="oleg@okmij.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of oleg@okmij.org designates 66.39.3.114 as permitted sender) identity=mailfrom; client-ip=66.39.3.114; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="oleg@okmij.org"; x-sender="oleg@okmij.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail1.g3.pair.com) identity=helo; client-ip=66.39.3.114; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="oleg@okmij.org"; x-sender="postmaster@mail1.g3.pair.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3A2xjDJB8ISpG7J/9uRHKM819IXTAuvvDOBiVQ1KB9?= =?us-ascii?q?1+4cTK2v8tzYMVDF4r011RmSDN+duqwP0ruempujcFRI2YyGvnEGfc4EfD4+ou?= =?us-ascii?q?JSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47AblHf6ke/8SQVUk2mc1Ek?= =?us-ascii?q?fKKkRMWL3oye7KObw9XreQJGhT6wM/tZDS6dikHvjPQQmpZoMa0ryxHE8TNicu?= =?us-ascii?q?VSwn50dxrIx06vrpT4wJk2/C1aofMs84hbWqX3ZakiZbNdBTUidWsy4YmjuhzK?= =?us-ascii?q?SQaE5nI0XWAfkx4OCA/Avz/gWZKklS/3uaIp3y2XMuXxTrU1W3Kl9ag9G0ygsz?= =?us-ascii?q?sOKzNsqDKfscd3lq8O+B8=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AUAAB5vSFYh3IDJ0JdGwEBAQMBAQEJA?= =?us-ascii?q?QEBFgEBAQMBAQEJAQEBgwQBAQEBAXd/jTmXA4dojGuCCCmFewKCFD8UAQEBAQE?= =?us-ascii?q?BAQEBAQESAQEBCgsJCR0wgjMYghYBAQECAQE6PwUuCTQFDT0SiEIDDwgOtD2HV?= =?us-ascii?q?w2DZAEBAQEBBQEBAQEBIoY9hyAcgTCDZYIvBY9Riik1gT93hACGV4MwC4I8gQC?= =?us-ascii?q?MWIkNhCOEBh6BMYNCgXdjhzoBAQE?= X-IPAS-Result: =?us-ascii?q?A0AUAAB5vSFYh3IDJ0JdGwEBAQMBAQEJAQEBFgEBAQMBAQE?= =?us-ascii?q?JAQEBgwQBAQEBAXd/jTmXA4dojGuCCCmFewKCFD8UAQEBAQEBAQEBAQESAQEBC?= =?us-ascii?q?gsJCR0wgjMYghYBAQECAQE6PwUuCTQFDT0SiEIDDwgOtD2HVw2DZAEBAQEBBQE?= =?us-ascii?q?BAQEBIoY9hyAcgTCDZYIvBY9Riik1gT93hACGV4MwC4I8gQCMWIkNhCOEBh6BM?= =?us-ascii?q?YNCgXdjhzoBAQE?= X-IronPort-AV: E=Sophos;i="5.31,462,1473112800"; d="scan'208";a="244074903" Received: from mail1.g3.pair.com ([66.39.3.114]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Nov 2016 13:01:51 +0100 Received: from Magus.localnet (fortigate.sf.ecei.tohoku.ac.jp [130.34.188.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail1.g3.pair.com (Postfix) with ESMTPSA id DEC273FBAA8; Tue, 8 Nov 2016 07:01:46 -0500 (EST) Date: Tue, 8 Nov 2016 21:07:16 +0900 From: Oleg To: gabriel.scherer@gmail.com, gmalecha@gmail.com Cc: yminsky@janestreet.com, jj@issuu.com, caml-list@inria.fr Message-ID: <20161108120716.GA6073@Magus.localnet> Mail-Followup-To: Oleg , gabriel.scherer@gmail.com, gmalecha@gmail.com, yminsky@janestreet.com, jj@issuu.com, caml-list@inria.fr MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) Subject: [Caml-list] The fastest stream library [Was: Question about Optimization] > 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.