Browse thread
Memory allocation nano-benchmark.
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | skaller <skaller@u...> |
| Subject: | Re: [Caml-list] Memory allocation nano-benchmark. |
On Sat, 2005-02-12 at 08:07, Oliver Bandel wrote: > > [skaller@pelican] ~>time ./zmem 250 > > > > real 0m3.110s > > user 0m2.820s > > sys 0m0.240s > > > > [skaller@pelican] ~>time ./zmem 250 > > > > real 0m27.732s > > user 0m2.750s > > sys 0m0.340s > > > Two runs, no difference? > Are you sure zmem and zmem are the same? Yes, its the same binary. > > IMHO > > > real 0m3.110s > > user 0m2.820s > > sys 0m0.240s > > and > > > real 0m27.732s > > user 0m2.750s > > sys 0m0.340s > > differ... Not significantly in user time. Remember this is not a serious measurement. > > table.(i).(j).(k) <- (i+1)*(j+1)*(k+1) > > > > Using bigarray (c_layout): > > > > real 0m27.948s > > user 0m0.770s > > sys 0m0.500s > > > > .. 4 times faster. > > ? > > What is faster than what?! The code using ordinary arrays runs in 2.8 seconds, using bigarray 0.7 seconds. 4 x 0.7 = 2.8. bigarray is 4 times faster to write than three level ordinary array. -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net