caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: olczyk@interaccess.com (Thaddeus L. Olczyk)
To: caml-list@inria.fr
Subject: Re: [Caml-list] ICFP 2002 Programming Contest Write-up?
Date: Sat, 12 Oct 2002 08:50:30 +0000 (GMT)	[thread overview]
Message-ID: <3da8e1a1.387903562@smtp.interaccess.com> (raw)
In-Reply-To: <86hefttv39.fsf@laurelin.dementia.org>

On Fri, 11 Oct 2002 01:15:06 -0400 (21.882 UMT), John Prevost
<j.prevost@cs.cmu.edu> wrote:

>>>>>> "es" == eijiro sumii <eijiro_sumii@anet.ne.jp> writes:
>
>    es>  - On the other hand, the CPU times are quite different: we
>    es> are more than 70 times faster!  This is surprising
>    es> enough---even though speed was not a goal in the task and even
>    es> though the CPU times may be somewhat imprecise as the judges
>    es> say---considering the other entry is written in (raw) C.
>
>Well, I took a look at the 2nd-place C program a bit--it's *designed*
>to use as much CPU time as possible, up to the limit.  Whenever it has
>time left over after planning, it uses that left over time to improve
>its map of the world.  Apparently in the default setup, it will always
>take very near to one full CPU second per move.
>
>That might explain the "CPU-hungry" nature of the entry, even though
>it's written in C.
>
This is not a good strategy. The rules say that it is averabe time for
moves that counts. So it doesn't matter when you do the calculation.
If you need something precaculated then you should do it at the
beginning, if you don't need it imeadiately, then you should delay
calculating until you need it. This saves CPU time.




















































-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  parent reply	other threads:[~2002-10-12  8:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-10  6:33 Oleg
2002-10-10  6:46 ` Thaddeus L. Olczyk
2002-10-10  7:25   ` Oleg
2002-10-10 18:04     ` eijiro_sumii
2002-10-10 19:03       ` eijiro_sumii
2002-10-11  5:15         ` John Prevost
2002-10-11 12:42           ` eijiro_sumii
2002-10-12  8:50           ` Thaddeus L. Olczyk [this message]
2002-10-21 11:39       ` Yutaka OIWA

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3da8e1a1.387903562@smtp.interaccess.com \
    --to=olczyk@interaccess.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).