From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 561C8BB88 for ; Mon, 1 Aug 2005 23:23:19 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j71LNIQM007608 for ; Mon, 1 Aug 2005 23:23:19 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA07132 for ; Mon, 1 Aug 2005 23:23:18 +0200 (MET DST) Received: from mailx.valdosta.edu (mailx.valdosta.edu [168.18.130.251]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j71LNHH1007339 for ; Mon, 1 Aug 2005 23:23:18 +0200 Received: from starlight.valdosta.edu (starlight.valdosta.edu [168.18.148.146]) by mailx.valdosta.edu (8.13.4/8.13.4) with ESMTP id j71LNGns005084 for ; Mon, 1 Aug 2005 17:23:17 -0400 (EDT) (envelope-from jtbryant@valdosta.edu) Subject: Function Inlining From: Jonathan Bryant Reply-To: jtbryant@valdosta.edu To: caml-list@inria.fr Content-Type: text/plain Organization: Valdosta State University Information Technology (System Operations) Date: Mon, 01 Aug 2005 17:24:50 -0400 Message-Id: <1122931490.3276.16.camel@starlight.valdosta.edu> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-16) Content-Transfer-Encoding: 7bit X-PMX-Version: 5.0.2.153301, Antispam-Engine: 2.0.3.2, Antispam-Data: 2005.8.1.26 X-Miltered: at nez-perce with ID 42EE92C6.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 42EE92C5.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; inlining:01 -inline:01 ocamlopt:01 inlining:01 inlined:01 labour:98 waldo:98 functions:01 functions:01 precisely:01 confused:02 executable:03 size:95 229:06 teaching:07 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 What is the deal with the -inline option for ocamlopt? I've turned it off (0), turned it on (1), turned it up (10 - 100) and gone crazy (10000) with it. Yet my executable says exactly the same size and runs in exactly the same time. I know inlining functions leads to code bloating and (usually) performance increases, so I'm confused. Is it not working? I have both large and small functions so it's not that they are all getting inlined any time it is on. Besides turning it off makes no difference. What's going on here? -- +=*===================_OX=+ | Jonathan Bryant |^| | jtbryant@valdosta.edu | | | AIM: JonBoy3182 | | | (229) 834-4400 | | +=========================+ "If the colleges were better, if they really had it, you would need to get the police at the gates to keep order in the inrushing multitude. See in college how we thwart the natural love of learning by leaving the natural method of teaching what each wishes to learn, and insisting that you shall learn what you have no taste or capacity for. The college, which should be a place of delightful labour, is made odious and unhealthy, and the young men are tempted to frivolous amusements to rally their jaded spirits. I would have the studies elective. Scholarship is to be created not by compulsion, but by awakening a pure interest in knowledge. The wise instructor accomplishes this by opening to his pupils precisely the attractions the study has for himself. The marking is a system for schools, not for the college; for boys, not for men; and it is an ungracious work to put on a professor." -- Ralph Waldo Emerson