• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting record items of a sublist
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting record items of a sublist


  • Subject: Re: Getting record items of a sublist
  • From: Stan Cleveland <email@hidden>
  • Date: Mon, 31 Oct 2011 17:40:58 -0700

On Oct 31, 2011, at 5:24 PM, Alex Zavatone wrote:

Here is the code that I'm rerunning to check how much overhead each call takes.

Hi Alex,

That's an nice way to determine the timer's overhead. Thanks for that!

I was just going to suggest another timing tool that's included with AppleMods Loader, the AS library system built by Hamish Sanderson. Specifically, the AppleModsTools.osax includes the AMTime command, which provides the number of seconds since 1 January 1970 0:00:00 GMT with microsecond precision.

Here's a sample of usage for script timing:
set startTime to AMTime
set n to 0
repeat with i from 1 to 1000000
set n to n + 1
end repeat
set elapsedTime to (AMTime) - startTime
--> 1.240820884705 

You can download the complete Loader project from here, which includes the osax binary:
http://sourceforge.net/projects/applemods/files/

XCode source for the osax is available here:
http://applemods.hg.sourceforge.net/hgweb/applemods/applemods/file/0bcd777f955a/dev/ext

The latest revision of the osax is from July 2010, so it's of relatively recent vintage.

Using your method, it appears the overhead for AMTime is approximately 0.001 seconds on my 2.4 GHz Core 2 Duo MacBook Pro running 10.6.8. Of course, one would expect an osax to be faster than a call to do shell script.

Stan C.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Getting record items of a sublist
      • From: Shane Stanley <email@hidden>
    • Re: Getting record items of a sublist
      • From: Alex Zavatone <email@hidden>
References: 
 >Re: Getting record items of a sublist (From: Nigel Garvey <email@hidden>)
 >Re: Getting record items of a sublist (From: Alex Zavatone <email@hidden>)
 >Re: Getting record items of a sublist (From: Christopher Stone <email@hidden>)
 >Re: Getting record items of a sublist (From: Alex Zavatone <email@hidden>)

  • Prev by Date: Re: Getting record items of a sublist
  • Next by Date: Re: Getting record items of a sublist
  • Previous by thread: Re: Getting record items of a sublist
  • Next by thread: Re: Getting record items of a sublist
  • Index(es):
    • Date
    • Thread