[GRASS-user] g.mlist updated
Huidae Cho
grass4u at gmail.com
Sat Jun 28 05:06:03 EDT 2008
Hi,
I've updated g.mlist to use sed instead of grep. Sed and grep (not grep
-E) both support basic regular expressions.
I've made a speed comparison between the new and previous versions:
$ for i in `seq 1 2000` ; do r.mapcalc tmp$i=1; done
$ time g.mlist.old rast pat="tmp*" |wc -l
2000
real 0m3.085s
user 0m2.860s
sys 0m0.036s
$ time g.mlist rast pat="tmp*" |wc -l
2000
real 0m0.136s
user 0m0.120s
sys 0m0.016s
The new version is about 23 times faster than the previous one. Please
test it out.
Huidae
More information about the grass-user
mailing list