Re: Program effeciency due to comments..
From: Ed Morton (mortonAVOIDINGSPAM_at_Lucent.com)
Date: 10/24/03
- Next message: web guy: "Re: sourcing a file question"
- Previous message: laura fairhead: "Re: sourcing a file question"
- In reply to: phud: "Re: Program effeciency due to comments.."
- Next in thread: Erik Max Francis: "Re: Program effeciency due to comments.."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 24 Oct 2003 14:42:59 -0500
On 10/24/2003 1:51 PM, phud wrote:
> It was a purely theoretical question, so I won't be able to show you any
> test results. But if i ever write a 10000 lines of shell script, I'll
> benchmark it for sure and post the results here. =)
Here's how to do that quickly - put this in an executable file called gen.ksh:
---------------------------
i=0
while (( $i < 10000 ))
do
cat <<! > run.ksh
echo "All work and no play makes Jack a dull boy"
!
cat <<! > runC.ksh
# All work and no play makes Jack a dull boy
echo "All work and no play makes Jack a dull boy"
!
i=$(( $i + 1 ))
do
chmod oug+x run.ksh
chmod oug+x runC.ksh
-------------------------
Then execute "gen.ksh" which will generate "run.ksh". Now execute these commands:
time run.ksh
time runC.ksh
You MAY want to redirect stdout to stderr 8-). Obviously you can change the
"echo" lines to whatever you like.
Enjoy...
Ed.
>
>
> Thanks for the comments!
>
>
> --
> Posted via http://dbforums.com
- Next message: web guy: "Re: sourcing a file question"
- Previous message: laura fairhead: "Re: sourcing a file question"
- In reply to: phud: "Re: Program effeciency due to comments.."
- Next in thread: Erik Max Francis: "Re: Program effeciency due to comments.."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|