1 |
Jan Kundrát wrote: |
2 |
> Steve Long wrote: |
3 |
>>> insinto /usr/share/doc/${P}/examples |
4 |
>> Is there any chance we can start using correctly quoted filenames across |
5 |
>> the board? |
6 |
> |
7 |
> Since when is ${P} allowed to have spaces? |
8 |
> |
9 |
I believe I answered this in my prior post. |
10 |
|
11 |
>> Besides being faster (quote the whole thing) |
12 |
> |
13 |
> Have you done a benchmark certifying that "/usr/share/doc/${P}/examples" |
14 |
> is faster than /usr/share/doc/${P}/examples? |
15 |
> |
16 |
Here you go (this is on an old machine, so you'll get much quicker times if |
17 |
you try this at home): |
18 |
[igli@box ~]$ echo "$(<run)" |
19 |
#!/bin/bash |
20 |
P='some-crap/god-i-hate-asshats' |
21 |
for ((i=0;i<100000;i++)); do echo /usr/share/doc/${P}/examples > /dev/null; |
22 |
done |
23 |
[igli@box ~]$ echo "$(<run2)" |
24 |
#!/bin/bash |
25 |
P='some-crap/god-i-hate-asshats' |
26 |
for ((i=0;i<100000;i++)); do echo "/usr/share/doc/$P/examples" > /dev/null; |
27 |
done |
28 |
|
29 |
[igli@box ~]$ for ((l=0;l<5;l++)); do time -p ./run; done |
30 |
real 11.25 |
31 |
user 9.96 |
32 |
sys 1.13 |
33 |
real 11.12 |
34 |
user 9.82 |
35 |
sys 1.16 |
36 |
real 10.99 |
37 |
user 9.70 |
38 |
sys 1.15 |
39 |
real 11.25 |
40 |
user 10.02 |
41 |
sys 1.07 |
42 |
real 11.36 |
43 |
user 10.06 |
44 |
sys 1.16 |
45 |
|
46 |
[igli@box ~]$ for ((l=0;l<5;l++)); do time -p ./run2; done |
47 |
real 9.24 |
48 |
user 8.00 |
49 |
sys 1.11 |
50 |
real 9.22 |
51 |
user 8.02 |
52 |
sys 1.08 |
53 |
real 9.08 |
54 |
user 7.90 |
55 |
sys 1.06 |
56 |
real 9.23 |
57 |
user 7.96 |
58 |
sys 1.15 |
59 |
real 9.18 |
60 |
user 7.98 |
61 |
sys 1.09 |
62 |
|
63 |
>> more useful error messages in the case of a dev/user slip-up |
64 |
> |
65 |
> Could you elaborate? |
66 |
> |
67 |
File not found "foo/bar bar/" as opposed to two separate lines; for elib |
68 |
functions, one would expect there to be an error handler which would be |
69 |
wrapping that, per-parameter. |
70 |
|
71 |
>> They also highlight better in a capable editor.[1] |
72 |
> |
73 |
> Please elaborate. |
74 |
> |
75 |
I did. |