• 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: A puzzle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A puzzle


  • Subject: Re: A puzzle
  • From: "Mark J. Reed" <email@hidden>
  • Date: Fri, 21 Nov 2008 19:38:37 -0500

To go back to the timing issue, I thought I'd try comparing the same algorithm across different interpreters on the same box (iMac Core 2 Duo 2GHz 3GB RAM running 10.5.5).

My version of Luther's TID="1" solution in AppleScript consistently takes 34 seconds, while my Perl take on the same idea runs just over 1 second. Only one solution was slower than the Applescript: bash takes about 50 seconds.  (But the same script runs in 30 seconds or less in ksh and zsh.)  Of course, a C version is much faster than anything else, clocking in at about 75 milliseconds.

Here's the results of what I tried OMM.  All times in seconds.

c:          0.075
perl:       1.149
python:     2.404
ruby:       3.717
sbcl:       3.983
js:         5.080
awk:        6.128
tclsh:      6.934
rhino:      9.505
clisp:     17.151
ksh:       26.163
zsh:       30.365
osascript: 32.979
bash:      48.124

Happy to supply the code I used offlist to anyone interested... but I suspect I've far exceeded anyone else's interest in this. :)


 _______________________________________________
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: A puzzle
      • From: Philip Aker <email@hidden>
    • Re: A puzzle
      • From: Paul Scott <email@hidden>
References: 
 >A puzzle (From: Michelle Steiner <email@hidden>)
 >Re: A puzzle (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Transliteration, TextCommands osax
  • Next by Date: Re: A puzzle
  • Previous by thread: Re: A puzzle
  • Next by thread: Re: A puzzle
  • Index(es):
    • Date
    • Thread