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=2.9 required=5.0 tests=AWL,DNS_FROM_RFC_POST, DNS_FROM_SECURITYSAGE,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id B5611BBAF for ; Sun, 2 Nov 2008 13:23:26 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuQAAPspDUlKfVwZkWdsb2JhbACTVj4BAQEBCQkMBw+pIgh4iV0BAwEDg0+BRQ X-IronPort-AV: E=Sophos;i="4.33,529,1220220000"; d="scan'208";a="31026065" Received: from qw-out-2122.google.com ([74.125.92.25]) by mail4-smtp-sop.national.inria.fr with ESMTP; 02 Nov 2008 13:23:26 +0100 Received: by qw-out-2122.google.com with SMTP id 9so1831486qwb.15 for ; Sun, 02 Nov 2008 04:23:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:reply-to:to:subject:date :user-agent:cc:references:in-reply-to:content-type :content-transfer-encoding:content-disposition:message-id; bh=mpq0ACsglkouePXAtgdeKLXrHaTWfrohd94vKq957Xo=; b=AniL7nYN7ZkuXvPNlowxoNQCqAZul5PWUAV8jKGfENb0lHMKm2ds/94LFgBz2xB8+2 FFaEFuX21XhvblWxsoQBI7MgvDzQsIHC1spXBem4b2UumqkxxfJsjeOHhHOCCtAO4udR z/Y1lh90XZGqooLOFY8HS4wzXetjBM6FNWQbY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:reply-to:to:subject:date:user-agent:cc:references:in-reply-to :content-type:content-transfer-encoding:content-disposition :message-id; b=Pnb6e3Ll2cYOyt+GGzH3Vw7VDu4sUjKAJLj7QU8NrTNYDrO867u5AU137/5WlLH5JR hG16Z/5WvvyVAeq11CPKGyztk/lzlWMvArrNK5/ynz1hYHwxCLBEgGU+zzywmXQyb0hq Wc1O2MZU0S+kO21RQS/KtyjNs7xKnrc2MsChc= Received: by 10.214.217.13 with SMTP id p13mr2497783qag.315.1225628604250; Sun, 02 Nov 2008 04:23:24 -0800 (PST) Received: from lawn-143-215-204-204.lawn.gatech.edu (lawn-143-215-204-204.lawn.gatech.edu [143.215.204.204]) by mx.google.com with ESMTPS id 5sm14009808yxt.1.2008.11.02.04.23.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 02 Nov 2008 04:23:23 -0800 (PST) From: Peng Zang Reply-To: peng.zang@gmail.com To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Question about optimization Date: Sun, 2 Nov 2008 07:23:18 -0500 User-Agent: KMail/1.9.7 Cc: =?utf-8?q?Micha=C5=82_C?= References: In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811020723.21552.peng.zang@gmail.com> X-Spam: no; 0.00; hash:01 -inline:01 -inline:01 ocamlopt:01 -unsafe:01 cmxa:01 lablgl:01 lablgl:01 cmxa:01 lablglut:01 beginner's:01 ocaml:01 bug:01 peng:98 peng:98 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have often found -inline 10 to be faster than -inline 100. But YMMV, Peng On Saturday 01 November 2008 10:52:49 pm MichaƂ C wrote: > 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 > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) iD8DBQFJDZu5fIRcEFL/JewRAikYAJ4qaO/HbPoVVP9xl3bCoYc0A17vlwCfbFyJ tkVitQkbANKQYhDxM2lfNQc= =2ycS -----END PGP SIGNATURE-----