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 over what could be a large number of elements. 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 (and 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 that of method call 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 each operation that doesn't have a clear answer and the profiling information 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 list copy of built in types (and does this actually copy the list elements, e.g. ints?) 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) the cost of a type check of an object (get-type or 'is a') the cost of checking the object hierarchy for a method (i.e. the cost of sub-classing objects) the cost of creating of a new object 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