Just in case ...what i have to do to test those results

...ps. should i send it here if i have a working c++ class for forking
-- it evolved from that python thought here, which evolved into
general interest to those pipes and interacting with other apps in my
case (which is, as i have understood, important in "unix-like
operating systems") ..therefore i encapsulate it into some generic c++
class to do piping and add some error checking, which would give
simple way to use scripting languages, too. i have still not installed
that c++ ide i like, but anyway, Kate is not so bad :) I have it
almost ready but it seems that i have to do some work now for a while
...do i send it here, too, when done or noone needs such thing
anymore? it just runs some command and gives a simple way to send
messages to its stdin and read its stdout so that interacting with
things like python could be simple, too.

2006/3/16, Brian Harring <[EMAIL PROTECTED]>:
> On Wed, Mar 15, 2006 at 11:14:04PM -0800, Donnie Berkholz wrote:
> > Brian Harring wrote:
> > > python -m timeit -s 's="asdf"*400;s+="fdsa.ebuild"' 
> > > 's.endswith(".ebuild")'
> > > 1000000 loops, best of 3: 0.88 usec per loop
> >
> > > python -m timeit -s 's="asdf"*400;s+="fdsa.ebuild"' 's[-7:] == ".ebuild"'
> > > 1000000 loops, best of 3: 0.564 usec per loop
> >
> > > Use endswith
> >
> > > oddly, worth noting that startswith differs in this behaviour...
> > > python -m timeit -s 's="asdf"*400;s+="fdsa.ebuild"' 's[:7] == ".ebuild"'
> > > 1000000 loops, best of 3: 0.592 usec per loop
> >
> > > python -m timeit -s 's="asdf"*400;s+="fdsa.ebuild"' 
> > > 's.startswith(".ebuild")'
> > > 1000000 loops, best of 3: 0.842 usec per loop
> >
> > Um, those both read the same way to me. You just switched the ordering
> > around, so the (starts|ends)with is on the bottom instead of the top,
> > but both times (starts|ends)with is longer.
>
> This is why crack is bad, mm'kay.
>
> /me lights the pipe and goes back to his corner.
>
> Pardon, just did a quick test and screwed the results ;)
> ~harring
>
>
>
>


--
tvali
(e-mail: "[EMAIL PROTECTED]"; msn: "[EMAIL PROTECTED]";
icq: "317-492-912")

Ühe eesti internetifirma lehel kohtasin tsitaati:
If you don't do it excellently, dont do it at all. Because if it's not
excellent, it won't be profitable or fun, and if you're not in
business for fun or profit, what the hell are you doing here?
Robert Townsend

-- 
gentoo-portage-dev@gentoo.org mailing list

Reply via email to