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
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to