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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 7898E7FA5F for ; Wed, 18 Jan 2017 22:19:58 +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=3AS1jc5BVhu78zQICR6YB8KFackWbV8LGtZVwlr6E/?= =?us-ascii?q?grcLSJyIuqrYZRKGt8tkgFKBZ4jH8fUM07OQ6PG8HzdRqs/d7ThCKMUKDEBVz5?= =?us-ascii?q?1O3kQJO42sNw7SFLbSdSs0HcBPBhdO3kqQFgxrIvv4fEDYuXao7DQfSV3VPAtx?= =?us-ascii?q?IfnpSMaJ15zkn7P6x5qGbhVBgTO2YbJ0IT25qAzQso8dho4xBLw2z07upnZHM7?= =?us-ascii?q?BRwW5nDVWQmhf+oMCq88gwoGxrp/s9+psYAu3BdKMiQOkAAQ=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AxAAAj239Yh3IDJ0JdGwEBAQMBAQEJA?= =?us-ascii?q?QEBFgEBAQMBAQEJAQEBgw4BAQEBAY9hcpEQlSyCC4YiAoIEPxgBAQEBAQEBAQE?= =?us-ascii?q?BARIBAQEKCwkKHTCCMxmCHgEEATo6BQUWITQFiVcIskaKQAEBCAEBAQEkhkqEb?= =?us-ascii?q?4UVgmeCMQWQJIsdglCPBQ2DSo0jkm8fgV8qCDqENxELgW+JZQEBAQ?= X-IPAS-Result: =?us-ascii?q?A0AxAAAj239Yh3IDJ0JdGwEBAQMBAQEJAQEBFgEBAQMBAQE?= =?us-ascii?q?JAQEBgw4BAQEBAY9hcpEQlSyCC4YiAoIEPxgBAQEBAQEBAQEBARIBAQEKCwkKH?= =?us-ascii?q?TCCMxmCHgEEATo6BQUWITQFiVcIskaKQAEBCAEBAQEkhkqEb4UVgmeCMQWQJIs?= =?us-ascii?q?dglCPBQ2DSo0jkm8fgV8qCDqENxELgW+JZQEBAQ?= X-IronPort-AV: E=Sophos;i="5.33,250,1477954800"; d="scan'208";a="256102353" 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; 18 Jan 2017 22:19:57 +0100 Received: from Magus.localnet (128-79-197-219.hfc.dyn.abo.bbox.fr [128.79.197.219]) (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 8D9A53FB13A; Wed, 18 Jan 2017 16:19:54 -0500 (EST) Date: Thu, 19 Jan 2017 06:20:08 +0900 From: Oleg To: examachine@gmail.com Cc: caml-list@inria.fr Message-ID: <20170118212008.GA2179@Magus.localnet> Mail-Followup-To: Oleg , examachine@gmail.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: Re: [Caml-list] ANN: BER MetaOCaml N104, for OCaml 4.04.0 > Have you ever designed at length how to implement a super fast > *interpreted* version of metaocaml, or let me put it this way: do you > think if that is possible at all? I guess you are asking about the complexity and overhead of building code representations (because otherwise, MetaOCaml is an ordinary OCaml program, and could be optimized as such). Code values have a somewhat complex representation because they also describe all future-stage free variables that occur within the value. The data structure used to represent free variable is designed to be efficient. Long time ago I did a spot test of generating code with 100 free variables. I could not detect any overhead due to the handling of free variables. Thus in my experience, MetaOCaml-specific overhead is rather negligible. If there is a real need to get MetaOCaml to generate code as fast as possible, one should optimize MetaOCaml as any other OCaml program. You may also be asking about the performance of Runcode.run. It includes compiling the code and running the resulting bytecode. Compilation does impose overhead. How to reduce it is a complex question. For now I remark that the generated code is usually rather simple. One could compile it with rather old version of OCaml, which was really fast. Cheers, Oleg