
The links are confusing, but unxutils is still available:
http://sourceforge.net/projects/unxutils/
MinGW/MSYS may be a better and/or more fully supported package but I have no experience there.
Anyhow, time is built into the unxutils "sh" shell:
C:\Documents and Settings\perry>sh
WREN# time sleep 3
sleep 3 0.00s user 0.00s system 0% cpu 3.125 total
WREN#
However, I'm pretty sure the shell is actually zsh, not sh.
----- Original Message ----
From: Henk-Jan van Tuyl
CygWin would be a good option.
Here are some other ideas:
There is a timeit.exe utility in the Windows Server downloads which is supposed to be similar to unix's time command. Try the links here http://channel9.msdn.com/forums/Coffeehouse/258979-Windows-equivalent-of-Uni...
Windows does support piping. It is similar to bash with 2>&1 to redirect stderr to stdout and stuff. http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-...
The new windows shell is almost a real shell. Almost.
If you don't have that, then this port of unix utilities makes an XP box tolerable. http://unxutils.sourceforge.net/
Hope that helps. --Tim
----- Original Message ---- From: Daniel Fischer
To: Markus Böhm Cc: beginners@haskell.org Sent: Mon, February 1, 2010 6:40:52 AM Subject: Re: [Haskell-beginners] Performance of Idiomatic lazy Haskell Am Montag 01 Februar 2010 15:22:45 schrieb Markus Böhm:
Daniel, I use GHC 6.12.1 and Windows XP.
*sigh*
Have you a CygWin installed? It should run as given from a CygWin shell, I believe.
The time command doesn't seem to work. It says in German: specified time can't be read. Give a new time.
Replace "time" with however you get the CPU time used by a process on Windows. But I think Windows doesn't allow piping, and I'm not sure whether it has echo, so see below.
Daniel, here another feedback:
F:\MeineUebungen>ghc -O2 -fexcess-precision -fvia-C -optc-O3 -o luaLoop --make p 085-pi_lualoop.hs [1 of 1] Compiling Main ( p085-pi_lualoop.hs, p085-pi_lualoop.o ) Linking luaLoop.exe ...
F:\MeineUebungen>echo '0.00000001' | time ./luaLoop Eingegebene Zeit kann nicht übernommen werden. Geben Sie die neue Zeit ein:
F:\MeineUebungen>luaLoop +RTS -sstderr -RTS luaLoop +RTS -sstderr EPS: 0.00000001 3.1415926485894725 61,428 bytes allocated in the heap 1,316 bytes copied during GC 4,564 bytes maximum residency (1 sample(s)) 11,820 bytes maximum slop 1 MB total memory in use (0 MB lost due to fragmentation)
Generation 0: 0 collections, 0 parallel, 0.00s, 0.00s elapsed Generation 1: 1 collections, 0 parallel, 0.00s, 0.00s elapsed
INIT time 0.02s ( 0.00s elapsed) MUT time 8.06s ( 16.83s elapsed) GC time 0.00s ( 0.00s elapsed) EXIT time 0.00s ( 0.00s elapsed) Total time 8.08s ( 16.83s elapsed)
%GC time 0.0% (0.0% elapsed)
Alloc rate 7,604 bytes per MUT second
Productivity 99.8% of total user, 47.9% of total elapsed
What?????
Please try the following:
1) hardcode eps = 1e-8 in the source (or get it via getArgs and pass it as a command line argument) 2) ghc -O2 -fforce-recomp -fexcess-precision -fvia-C -optc-O3 -o cloop -- make Source.hs 3) ghc -O2 -fforce-recomp -o nloop --make Source.hs 4) cloop +RTS -sstderr 5) nloop +RTS -sstderr
-- Markus
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
--