Gentoo Archives: gentoo-portage-dev

From: tvali <qtvali@×××××.com>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] Manifest2 reloaded
Date: Thu, 16 Mar 2006 09:06:52
Message-Id: cea53e3c0603160106o482eb951r@mail.gmail.com
In Reply to: Re: [gentoo-portage-dev] [PATCH] Manifest2 reloaded by Brian Harring
1 Just in case ...what i have to do to test those results
2
3
4 ...ps. should i send it here if i have a working c++ class for forking
5 -- it evolved from that python thought here, which evolved into
6 general interest to those pipes and interacting with other apps in my
7 case (which is, as i have understood, important in "unix-like
8 operating systems") ..therefore i encapsulate it into some generic c++
9 class to do piping and add some error checking, which would give
10 simple way to use scripting languages, too. i have still not installed
11 that c++ ide i like, but anyway, Kate is not so bad :) I have it
12 almost ready but it seems that i have to do some work now for a while
13 ...do i send it here, too, when done or noone needs such thing
14 anymore? it just runs some command and gives a simple way to send
15 messages to its stdin and read its stdout so that interacting with
16 things like python could be simple, too.
17
18 2006/3/16, Brian Harring <ferringb@×××××.com>:
19 > On Wed, Mar 15, 2006 at 11:14:04PM -0800, Donnie Berkholz wrote:
20 > > Brian Harring wrote:
21 > > > python -m timeit -s 's="asdf"*400;s+="fdsa.ebuild"' 's.endswith(".ebuild")'
22 > > > 1000000 loops, best of 3: 0.88 usec per loop
23 > >
24 > > > python -m timeit -s 's="asdf"*400;s+="fdsa.ebuild"' 's[-7:] == ".ebuild"'
25 > > > 1000000 loops, best of 3: 0.564 usec per loop
26 > >
27 > > > Use endswith
28 > >
29 > > > oddly, worth noting that startswith differs in this behaviour...
30 > > > python -m timeit -s 's="asdf"*400;s+="fdsa.ebuild"' 's[:7] == ".ebuild"'
31 > > > 1000000 loops, best of 3: 0.592 usec per loop
32 > >
33 > > > python -m timeit -s 's="asdf"*400;s+="fdsa.ebuild"' 's.startswith(".ebuild")'
34 > > > 1000000 loops, best of 3: 0.842 usec per loop
35 > >
36 > > Um, those both read the same way to me. You just switched the ordering
37 > > around, so the (starts|ends)with is on the bottom instead of the top,
38 > > but both times (starts|ends)with is longer.
39 >
40 > This is why crack is bad, mm'kay.
41 >
42 > /me lights the pipe and goes back to his corner.
43 >
44 > Pardon, just did a quick test and screwed the results ;)
45 > ~harring
46 >
47 >
48 >
49 >
50
51
52 --
53 tvali
54 (e-mail: "qtvali@×××××.com"; msn: "qtvali@×××××.com";
55 icq: "317-492-912")
56
57 Ühe eesti internetifirma lehel kohtasin tsitaati:
58 If you don't do it excellently, dont do it at all. Because if it's not
59 excellent, it won't be profitable or fun, and if you're not in
60 business for fun or profit, what the hell are you doing here?
61 Robert Townsend
62
63 --
64 gentoo-portage-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-portage-dev] [PATCH] Manifest2 reloaded Brian Harring <ferringb@×××××.com>