I�m sorry for the "waste". Fortunately you understand what I mean, I made a
bad interpretation of waste word. I hope I get a better english soon, or I
give up and starts to learn Esperanto. :-)

Well, I use a Motorola Dragonball 33MHz (tungstenW - about 30,3ns). Do you
know how much time are used to perform the function I request when this
function is constant-time O(1). Of course, if nobody knows I will search in
motorola�s datasheet.

-----Mensagem original-----
De: Ben Combee [mailto:[EMAIL PROTECTED]
Enviada em: quarta-feira, 18 de agosto de 2004 12:01
Para: Palm Developer Forum
Assunto: Re: Cycles of Clock


At 09:10 AM 8/18/2004, you wrote:
>Hi, Is there anyone here who knows how much cycles of clock the processor
>waste to execute the following funtions?
>
>DmNumRecords
>DmQueryRecord
>DmReleaseRecord
>
>I have a big database to work with in palm and I need to know that to know
>what path I must walk, defines estrategies...

Well, the cycles aren't wasted -- they're used to perform the function you 
request :)  The time also varied depending on the OS version and processor.

All of these are constant-time functions.  Since the record index in a DB 
is stored in an array and the number of records is stored in the DB header, 
it's in O(1) operation to ask for the number of records, to get the handle 
for a single record, and to release the record when done.

However, you don't pair DmQueryRecord and DmReleaseRecord -- the release 
function is only used with DmGetRecord and DmNewRecord.  You shouldn't 
modify a record that you've queried.


-- Ben Combee, DTS technical lead, PalmSource, Inc.
    "Combee on Palm OS" weblog: http://palmos.combee.net/
    Palm OS Dev Fourm Archives: http://news.palmos.com/read/all_forums/



-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/

--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to