Request for timing information

Eric DeWitt <[email protected]>
Newsgroups gmane.comp.breve
Message-ID <[email protected]>
I am writing genetic code that must be run in every agent (potentially 
a large number) and requires some nested looping.  I need to get some 
accurate information on timing of some operations in breve/steve and I 
think that they'd be useful for everybody (an might end up in the 
documentation eventually).  What I'd like is information on the cost of 
the operations mentioned below in both some absolute and relative 
terms.  (For example, is the cost of the indexed retrieval from a list 
O(N), with what constant and how does this constant compare to method 
overhead?)  Some of this is, I am sure, constant time and 
insignifigant--I just would like some relative idea of the costs.  I 
assume a pretty simple test could be configured to perform a large 
number of the operations and the profiling information can be extracted 
and averaged.

	the cost of an object method call (and value return)
	the cost of an index into an list
	the cost of prepending (vs pushing) onto a list.
	the cost of getting the size of a list (i.e. when a list is used as a 
number)
	the cost of a hash lookup/assignment
	the cost of coercing one data type to another
	the cost of a string compare (vs an int compare)

One of the questions I am trying to answer is, lacking real arrays how 
efficient are lists compared to objects (where the root list of a 
nested list is used to represent the information in a structured way 
and requires lots of indexed lookups).  Unfortunately, the easy 'self 
get-time' only deals with sim time so I cannot easily grab this info 
myself...  thanks!

-eric

_______________________________________________
breve mailing list
[email protected]
http://www.spiderland.org/mailman/listinfo/breve
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.