• 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: Help with find text command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with find text command


  • Subject: Re: Help with find text command
  • From: Philip Aker <email@hidden>
  • Date: Sat, 04 Aug 2007 08:55:24 -0700

On 2007-08-03, at 14:10:09, Mark J. Reed wrote:

Perl is usually significantly faster than Ruby, though I'd generally rather write the Ruby.  But the difference can easily be overwhelmed by overhead (of starting up either one, etc).

Maybe Ed's off for the weekend. I might try to concoct a perly using Hamish's regex just to test that opinion.

Meantime, I've put an AppleScript and Tcl solution here:

<http://homepage.mac.com/philip_aker/dl/code/TestISBN.zip>

I test with:

# time osascript asisbn.scpt 

and 

# time tclsh tclisbn.tcl


What I'd appreciate is some independent confirmation that the two HTML output files look the same in Safari and some timing results from a different setup.

Below are some results.  I've chopped off the first two calls from each because both osascript and tclsh have first-run overhead after a restart and it was unfair to osascript to consider it's longer first-run startup penalty.  As anyone can probably verify, after the handicap, osascript consistently takes an order of magnitude greater amount of time to produce the same result. 


[Desktop]# time osascript asisbn.scpt 
real    0m0.410s
user    0m0.265s
sys     0m0.037s

[Desktop]# time osascript asisbn.scpt 
real    0m0.403s
user    0m0.264s
sys     0m0.035s

[Desktop]# time osascript asisbn.scpt 
real    0m0.406s
user    0m0.264s
sys     0m0.036s

[Desktop]# time osascript asisbn.scpt 
real    0m0.406s
user    0m0.265s
sys     0m0.036s

[Desktop]# time osascript asisbn.scpt 
real    0m0.406s
user    0m0.265s
sys     0m0.036s

[Desktop]# time osascript asisbn.scpt 
real    0m0.405s
user    0m0.264s
sys     0m0.035s


[Desktop]# time tclsh tclisbn.tcl 
real    0m0.031s
user    0m0.014s
sys     0m0.010s

[Desktop]# time tclsh tclisbn.tcl 
real    0m0.030s
user    0m0.014s
sys     0m0.010s

[Desktop]# time tclsh tclisbn.tcl 
real    0m0.029s
user    0m0.014s
sys     0m0.010s

[Desktop]# time tclsh tclisbn.tcl 
real    0m0.029s
user    0m0.014s
sys     0m0.011s

[Desktop]# time tclsh tclisbn.tcl 
real    0m0.029s
user    0m0.014s
sys     0m0.010s

[Desktop]# time tclsh tclisbn.tcl 
real    0m0.029s
user    0m0.014s
sys     0m0.010s


Philip Aker
email@hidden
 _______________________________________________
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: Help with find text command
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Re: Help with find text command (From: has <email@hidden>)
 >Re: Help with find text command (From: Philip Aker <email@hidden>)
 >Re: Help with find text command (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Word - Save As - HTML
  • Next by Date: Re: Help with find text command
  • Previous by thread: Re: Help with find text command
  • Next by thread: Re: Help with find text command
  • Index(es):
    • Date
    • Thread