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 75FFA7EE35 for ; Sun, 17 Apr 2016 10:59:56 +0200 (CEST) IronPort-PHdr: 9a23:4ZxE9R8wB4oVTP9uRHKM819IXTAuvvDOBiVQ1KB80+gcTK2v8tzYMVDF4r011RmSDdWdtaoP07qempujcFJDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXsq3G/pQQfBg/4fVIsYL+lSsiM14/vh6ibwN76XUZhvHKFe7R8LRG7/036l/I9ps9cEJs30QbDuXBSeu5blitCLFOXmAvgtI/rpMYwuwwZgf8q9tZBXKPmZOx4COUAVHV1e1wyse/mrgHOV0Or4WYdSS0/lBZFGRPI6lmuXJrqqibg8O56xSiBe8TwQb0uQjmkx6huQR7sziwAMmhq3nvQj5lVi6JSpR+t7z1w3oPOZoWcMPM2KqLSYN4AA2NcQsF5WClIA4f6ZIwKWblSdd1EppXw8gNd5SC1AhOhUaa2kmdF Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=iguer.auto@gmail.com; spf=Pass smtp.mailfrom=iguer.auto@gmail.com; spf=None smtp.helo=postmaster@mail-wm0-f65.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of iguer.auto@gmail.com) identity=pra; client-ip=74.125.82.65; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="iguer.auto@gmail.com"; x-sender="iguer.auto@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of iguer.auto@gmail.com designates 74.125.82.65 as permitted sender) identity=mailfrom; client-ip=74.125.82.65; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="iguer.auto@gmail.com"; x-sender="iguer.auto@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-wm0-f65.google.com) identity=helo; client-ip=74.125.82.65; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="iguer.auto@gmail.com"; x-sender="postmaster@mail-wm0-f65.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CEAADvTxNXi0FSfUpcgwyBfKYKAQEGgVyHLoYMhHMBDYFxhg4CgR84FAEBAQEBAQEBEQEBAQgLCwkfMYItghUBAQQSER0BGx0BAwwGAwILFiECAg8CEhEBBQEcBg0IAQEeh3EBAxIBjRCPQYExPjGLNoFqgleGbwoZJw1RhEEBAQEBAQEBAwEBAQEBAQETAQUKBYVKhROHP4JWBYd0hV+KO44OZYhIhWSNbi+BDh4BAYI5HoFVaokPAQEB X-IPAS-Result: A0CEAADvTxNXi0FSfUpcgwyBfKYKAQEGgVyHLoYMhHMBDYFxhg4CgR84FAEBAQEBAQEBEQEBAQgLCwkfMYItghUBAQQSER0BGx0BAwwGAwILFiECAg8CEhEBBQEcBg0IAQEeh3EBAxIBjRCPQYExPjGLNoFqgleGbwoZJw1RhEEBAQEBAQEBAwEBAQEBAQETAQUKBYVKhROHP4JWBYd0hV+KO44OZYhIhWSNbi+BDh4BAYI5HoFVaokPAQEB X-IronPort-AV: E=Sophos;i="5.24,496,1454972400"; d="scan'208,217";a="174742160" Received: from mail-wm0-f65.google.com ([74.125.82.65]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 17 Apr 2016 10:59:55 +0200 Received: by mail-wm0-f65.google.com with SMTP id y144so16528026wmd.0 for ; Sun, 17 Apr 2016 01:59:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:to:references:cc:message-id:date:user-agent :mime-version:in-reply-to; bh=e5mhfFjicMkhR0sFwQHzjM2fLDMvYPFBNc/5lSTR6qs=; b=Uom1aV+pJMTehGdr3ncF97VRk4ZWSPEuaixtlwLHRUVDHF8nj1NuQc7oJyj8ysmnF1 hKsVugcSbHThgxHAHsGUJBdlWkpchubfqrOjGKG0RgSiDMNQrjtzrAssZi87YMLwf/R1 jFKBvZxp3SO2Vdhbw/BIguLAde+R+Lum0AarK8UoDsPu0qCqAeTuVBIDZwv4H7iKIyTu onztuif8HmyS530SyYoH41LOw9+yUaKn6Ff4p3FKp4H3JvHG5kHHYQ83GUZbsbgKHjTl htbJowbHYoXBp1gP4JUPNxi25X+BeSWLjxA0BbPu5Z1UnNmzmurqXeLd6qlwYGGNrQWE niqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to; bh=e5mhfFjicMkhR0sFwQHzjM2fLDMvYPFBNc/5lSTR6qs=; b=CsCEzBNrBNL3Z5IdJ1cKJdMN/lNNCdVTnjZx9FMFfityOhHv1Pq9GjaPCSgn9zRElS q/xBs9Ae80+JJm/Smqs1DLCVE8BbO8ytCUA8dnaHQC3TKv2VYGIxZk878k5mWMODfEaY lb6pfZbVbCvpbaSzF4kJee8NcySidzSZ6J+M2C4IyK5ItlZf4UhtyEsll49/xprHxj1j kW/8L+/y5XXay9NtYqhTJ3//czdMfOwh7JG276TTV3vXkVHWAzWCBJNDNeFGO2I3kOaR y+gr1Hr49OQk6T5o+EYMVEQ0fLQDFk/XCa/9x21hsfFLyu7YW95D4Gcr++Dir6D2U7B8 KSjA== X-Gm-Message-State: AOPr4FUPkqK6kNmafsCbcEE2KoGDL2FaZPuBnrRD8ey6zv/VzYDbcbMp3+5xlJZwDBPsnQ== X-Received: by 10.194.87.103 with SMTP id w7mr30014592wjz.13.1460883595220; Sun, 17 Apr 2016 01:59:55 -0700 (PDT) Received: from ?IPv6:2a01:cb04:c3:1c00:b839:2fe:3f3c:d76b? (2a01cb0400c31c00b83902fe3f3cd76b.ipv6.abo.wanadoo.fr. [2a01:cb04:c3:1c00:b839:2fe:3f3c:d76b]) by smtp.gmail.com with ESMTPSA id h124sm7299382wmf.7.2016.04.17.01.59.54 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 17 Apr 2016 01:59:54 -0700 (PDT) From: Mohamed Iguernlala To: Jesper Louis Andersen References: <56DF57FA.9070309@lexifi.com> Cc: caml-list@inria.fr Message-ID: <5713508A.905@gmail.com> Date: Sun, 17 Apr 2016 10:59:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------040604000309010700030503" Subject: Re: [Caml-list] Status of Flambda in OCaml 4.03 This is a multi-part message in MIME format. --------------040604000309010700030503 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Good results, but it would be better to compare with 4.03.0+trunk. Have you used particular options for flambda (eg. -O3 -unbox-closures) ? have you modified the default value of -inline option ? I noticed better performances with "-O3 -unbox-closures" on Alt-Ergo, but I have probably to ajust the value of "-inline" (which is currently set to 100). - Mohamed.| | Le 17/04/2016 10:43, Jesper Louis Andersen a écrit : > Tried `opam switch ocaml-4.03.0+trunk+flambda` on the Transit format > encoder/decoder i have. I wanted to see how much faster flambda would > make the code, since I've heard 20% and 30% thrown around. It is not > very optimized code, and in particular, the encoder path is rather > elegant, but awfully slow. Well, not anymore: > > 4.02: > Name Time/Run mWd/Run mjWd/Run Prom/Run Percentage > ------------ ---------- ------------ ---------- ---------- ------------ > decode 2.12ms 352.86kw 34.86kw 34.86kw 27.88% > encode 5.07ms 647.93kw 263.69kw 250.40kw 66.70% > round_trip 7.61ms 1_000.79kw 298.54kw 285.26kw 100.00% > 4.03.0+trunk+flambda: > > │ Name │ Time/Run │ mWd/Run │ mjWd/Run │ Prom/Run │ Percentage │ > > │ decode │ 2.04ms │ 319.83kw │ 35.94kw │ 35.94kw │ 43.97% │ > │ encode │ 2.65ms │ 422.67kw │ 130.88kw │ 117.59kw │ 56.95% │ > │ round_trip │ 4.65ms │ 742.50kw │ 164.85kw │ 151.56kw │ 100.00% │ > > Pretty impressive result. Note the heavyweight lifting is due to the > yajl JSON parser and this poses a lower bound. But I think the speedup > in the encode-path is rather good. > > Note that the benchmark is probably flawed and some time passed > between these two runs, so there might be a confounder hidden in other > fixes, either to yajl, or to other parts of the compiler toolchain. > However, I think the result itself stands since in practice, my > encoding time was just cut in half. > --------------040604000309010700030503 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit Good results, but it would be better to compare with 4.03.0+trunk.

Have you used particular options for flambda (eg. -O3 -unbox-closures) ?
have you modified the default value of -inline option ?

I noticed better performances with "-O3 -unbox-closures" on Alt-Ergo, but
I have probably to ajust the value of "-inline" (which is currently set to 100).

- Mohamed.


Le 17/04/2016 10:43, Jesper Louis Andersen a écrit :
Tried `opam switch ocaml-4.03.0+trunk+flambda` on the Transit format encoder/decoder i have. I wanted to see how much faster flambda would make the code, since I've heard 20% and 30% thrown around. It is not very optimized code, and in particular, the encoder path is rather elegant, but awfully slow. Well, not anymore:

4.02:
 Name         Time/Run      mWd/Run   mjWd/Run   Prom/Run   Percentage  
------------ ---------- ------------ ---------- ---------- ------------ 
 decode         2.12ms     352.86kw    34.86kw    34.86kw       27.88%  
 encode         5.07ms     647.93kw   263.69kw   250.40kw       66.70%  
 round_trip     7.61ms   1_000.79kw   298.54kw   285.26kw      100.00%  
4.03.0+trunk+flambda:

│ Name       │ Time/Run │  mWd/Run │ mjWd/Run │ Prom/Run │ Percentage │

│ decode     │   2.04ms │ 319.83kw │  35.94kw │  35.94kw │     43.97% │
│ encode     │   2.65ms │ 422.67kw │ 130.88kw │ 117.59kw │     56.95% │
│ round_trip │   4.65ms │ 742.50kw │ 164.85kw │ 151.56kw │    100.00% │

Pretty impressive result. Note the heavyweight lifting is due to the yajl JSON parser and this poses a lower bound. But I think the speedup in the encode-path is rather good.

Note that the benchmark is probably flawed and some time passed between these two runs, so there might be a confounder hidden in other fixes, either to yajl, or to other parts of the compiler toolchain. However, I think the result itself stands since in practice, my encoding time was just cut in half.


--------------040604000309010700030503--