From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: **** X-Spam-Status: No, score=4.8 required=5.0 tests=DNS_FROM_RFC_POST, DNS_FROM_SECURITYSAGE,SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id E1433BB84 for ; Sun, 2 Nov 2008 03:52:53 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvwBALSyDElIDtyZimdsb2JhbACNf4VXPgEBAQoJDAcPBakzgQCKBQEDAQODTw X-IronPort-AV: E=Sophos;i="4.33,528,1220220000"; d="scan'208";a="18760434" Received: from fg-out-1718.google.com ([72.14.220.153]) by mail3-smtp-sop.national.inria.fr with ESMTP; 02 Nov 2008 03:52:53 +0100 Received: by fg-out-1718.google.com with SMTP id l27so1567990fgb.43 for ; Sat, 01 Nov 2008 19:52:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:content-transfer-encoding:mime-version:subject:date :x-mailer; bh=/u22SsV99E6nEG7TPzsLUFSV26n0mOsdvEKitq/YK7Q=; b=D5NnbTjJjQrikiL422DJrUNAA/KKo2tkcwSIV25ziwUcULC6sdnwgsaRdv5vkoXhCl jFY3BM+x/D8zimRctqiJvA/HD7wHyCfw77cLsOgRO191VGnS4I4iMuiSnrF+GZrlDWBF O3UaJ+3fm9ywx08CS+fJVxl9Ea4jBRrsUyeCA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:content-transfer-encoding :mime-version:subject:date:x-mailer; b=dDdbw9G49Tf91aFV43nGk6hHktg/a/dsM8wUCpneWzbwCS0FaxlaQd5/p0xJ7qlWGA tMKp6HpG6I+TETj8LwQ4uadc8lQOk4KBADrwldoD8Bf2XIF8Kj2vAUneiiU8/2T67bGb dmFPK0cMJiBE6G0hEk1ZHzYKnsyBJxIh6CkeE= Received: by 10.86.26.1 with SMTP id 1mr9713061fgz.75.1225594372417; Sat, 01 Nov 2008 19:52:52 -0700 (PDT) Received: from 093105244049.rcb.vectranet.pl (093105244049.rcb.vectranet.pl [93.105.244.49]) by mx.google.com with ESMTPS id 4sm6887881fge.8.2008.11.01.19.52.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 01 Nov 2008 19:52:51 -0700 (PDT) Message-Id: From: =?ISO-8859-2?Q?Micha=B3_C?= To: caml-list@yquem.inria.fr Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Subject: Question about optimization Date: Sun, 2 Nov 2008 03:52:49 +0100 X-Mailer: Apple Mail (2.929.2) X-Spam: no; 0.00; ocamlopt:01 -inline:01 -unsafe:01 cmxa:01 lablgl:01 lablgl:01 cmxa:01 lablglut:01 ovh:98 hardcore:98 compile:01 optimization:03 optimization:03 optimizing:03 path:07 Hi! I'm working on a physical based ray(path) tracer and the performance is one of my top priorities (just after the image quality). So I have a question about optimization: can You share some tips or maybe optimizing strategies to improve the speed of programs? here is my code: http://neos1.ovh.org/ray3.ml, and here is how I compile it: ocamlopt -inline 100 -unsafe -ffast-math str.cmxa -I +lablgl lablgl.cmxa lablglut.cmxa -o ray ray.ml Maybe You can take a look, sure I don't expect You to look through it in some hardcore way, but You know, maybe there are some obvious mistakes or unnecessary boxing which will spot your eye. Thanks in advance, oh and if you possibly want to see the development or how the program works - http://neos1.wordpress.com Regards