l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
October 7: Social gathering
Next Installfest:
TBD
Latest News:
Aug. 18: Discounts to "Velocity" in NY; come to tonight's "Photography" talk
Page last updated:
2006 Feb 20 11:52

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] benchmarking (again)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] benchmarking (again)



Peter Jay Salzman wrote:
I'm benchmarking doubles versus floats using C++, C, and java on Cygwin.
[...]

The timings for Float.java and Double.java are wierd...

   $ time java Float
   real    0m1.365s
   user    0m0.015s
   sys     0m0.061s

   $ time java Double
   real    0m1.318s
   user    0m0.015s
   sys     0m0.015s

What am I to make of the user time here?

And although I didn't show the "real" time for C++, the java real time is
lower than all the real times for the C++ trials.

How can this be?  I thought that java does stuff like initializing all basic
datatypes to "0" upon instantiation.  And I've read that java allocates
memory for all data items on the heap, which is never stored in L1 cache
while for C and C++, temporary objects are often put into the L1 cache.

How is java real time faster than C++ real time here?
That looks like an artifact of cygwin.  Process management under Windows
is at best an approximation of *nix process management.  What you are
timing is the launch process for the Java runtime, rather than the
actual launch of Java or the execution of your code.  Use Java's
internal timing functions or do your comparisons under Linux.

I get the following user times on my Kubuntu system:

	Double	Float
	1.605	1.764
	1.613	1.824
	1.650	1.808
	1.614	1.808
	1.615	1.791
	1.632	1.849
	1.616	1.813
	1.643	1.857
	1.597	1.810
	1.652	1.846
		
avg	1.624	1.817
sdev	0.019	0.028

--
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil@dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
---------------------------------------------------------------------------
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!