Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D232C200C57 for ; Sat, 1 Apr 2017 05:17:20 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D0D42160B8C; Sat, 1 Apr 2017 03:17:20 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 20F58160B80 for ; Sat, 1 Apr 2017 05:17:19 +0200 (CEST) Received: (qmail 55066 invoked by uid 500); 1 Apr 2017 03:17:19 -0000 Mailing-List: contact dev-help@systemml.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@systemml.incubator.apache.org Delivered-To: mailing list dev@systemml.incubator.apache.org Received: (qmail 55051 invoked by uid 99); 1 Apr 2017 03:17:19 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Apr 2017 03:17:19 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 976A1C18AA for ; Sat, 1 Apr 2017 03:17:18 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.129 X-Spam-Level: ** X-Spam-Status: No, score=2.129 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=googlemail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 5g4z6iqysNd7 for ; Sat, 1 Apr 2017 03:17:17 +0000 (UTC) Received: from mail-ua0-f179.google.com (mail-ua0-f179.google.com [209.85.217.179]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 20CF75F58E for ; Sat, 1 Apr 2017 03:17:17 +0000 (UTC) Received: by mail-ua0-f179.google.com with SMTP id d64so4700555uad.2 for ; Fri, 31 Mar 2017 20:17:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=jxl4dRTTL+2C9CkhkpsMX+jzW49+ON7m4MgZF4jCpxE=; b=RgTjZUyYAKtB5sLHdA0Aw4VqTqT9eP57b0OqmtT1kupLuQ0UkiEjJ6ifxRFaXKA4KE S40RUkNPnd6Nrxr7flBGbvmsoyPHBth7fSQ69351ZXCOQOOJiHWlLPCv9xXGjC+njTXc ETRDuTkrasr0bH1r0fYlvqtPHO2wNawAU5tIT2bzUwVQ/xWErBPsTcdUzhMAgoLPrRrM hs0q+s7cih4G2Ihn35G0HRnFWaIgbig24r4ATXJrwmDaaGb+Tfmn0zlUYLH5Y8KpWJ7q SnaSqp10IyjNZBkTK24KWfV8VcDSCnK/aJJaxt8aosQeF+4zD6bOsYJOxpdeC5SzSoKA Y4eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=jxl4dRTTL+2C9CkhkpsMX+jzW49+ON7m4MgZF4jCpxE=; b=kTN+k2tF2FKPw+WN5jTxPMc7c8wifrycuYrbYGDTHEh9dvHraavAIrb2KO6cYxRQr5 6EOhCFIcr9jgGXEDl9l8EbGb3L7lzhgai2D+3dWCnST1pLRa92ZoiUu2goD/uD030ueQ dHXqqBHP7H3xfjIvFMXtuLWkzN02Jp3giw5FGCyjlHXx6O/b+TtwoK0nGEm7DccHH2W3 ugd+TZgZ2k1Tv70XzfqESkC+V76CElSln94IQFwVfaVYt9ruzt7D5CCLucInKosW+HkF Z1qNUc2DG0/PbP7xX4wLgFFj5Br4gWupxXO81MO2USUqyEoRiE0d1BBpi3yLAINZ0Y5l Zi4Q== X-Gm-Message-State: AFeK/H2d+x3mQIS4ZPzsMxsTiYjYrpRuYMaiWydtuT03kLeNaDEHnK7JXqNGyb1lQJuQBPgUfOhDUr5Y2W8LIw== X-Received: by 10.159.49.87 with SMTP id n23mr3226188uab.157.1491016636596; Fri, 31 Mar 2017 20:17:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.0.202 with HTTP; Fri, 31 Mar 2017 20:17:16 -0700 (PDT) From: Matthias Boehm Date: Fri, 31 Mar 2017 20:17:16 -0700 Message-ID: Subject: Java compiler for code generation To: dev@systemml.incubator.apache.org Content-Type: multipart/alternative; boundary=f403045dd2d2fa868f054c125ca6 archived-at: Sat, 01 Apr 2017 03:17:21 -0000 --f403045dd2d2fa868f054c125ca6 Content-Type: text/plain; charset=UTF-8 Hi all, currently, our new code generator for operator fusion, uses the programmatic javax.tools.JavaCompiler, which is Java's standard API for compilation. Despite a plan cache that mitigates unnecessary compilation and recompilation overheads, we still see significant end-to-end overhead especially for small input data. Moving forward, I'd like to switch to Janino (org.codehaus.janino.SimpleCompiler), which is a fast in-memory Java compiler with restricted language support. The advantages are (1) Reduced compilation overhead: On end-to-end scenarios for L2SVM, GLM, and MLogreg, Janino improved total javac compilation time from 2.039 to 0.195 (14 operators), from 8.134 to 0.411 (82 operators), and from 4.854 to 0.283 (46 operators), respectively. At the same time, there was no measurable impact on runtime efficiency, but even slightly reduced JIT compilation overhead. (2) Removed JDK requirement: Using the standard javax.tools.JavaCompiler requires the existence of a JDK, while Janino only requires a JRE, which means it makes it easier to apply code generation by default. However, I'm raising this here as Janino would add another explicit dependency (with BSD license). Fortunately, Spark also uses Janino for whole-stage-codegen. So we should be able to mark Janino as provided library. The only issue is a pure Hadoop environment, where we still want to use code generation for CP operations. To simplify the build, I could imagine using the javax.tools.JavaCompiler for hadoop execution types, but Janino by default. If you have any concerns, please let me know by Monday; otherwise I'd like to push this change into our upcoming 0.14 release. Regards, Matthias --f403045dd2d2fa868f054c125ca6--