Re: Help with find text command
Re: Help with find text command
- Subject: Re: Help with find text command
- From: "Mark J. Reed" <email@hidden>
- Date: Sat, 4 Aug 2007 12:15:38 -0400
Not sure osascript is a fair test, though. It's not exactly AS's
native environment.
On 8/4/07, Philip Aker <email@hidden> wrote:
> 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
--
Mark J. Reed <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