Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: regexr string function very slow in Stata13


From   Nicola Tommasi <[email protected]>
To   [email protected]
Subject   st: regexr string function very slow in Stata13
Date   Fri, 13 Dec 2013 11:20:58 +0100

Hi all
On my computer they are installed Stata12 and Stata13, but regexr function run very slowly in Stata13. Here a log file
Any idea?



. count;
730649

. di "`c(stata_version)' - `c(os)' - `c(osdtl)' - `c(machine_type)' - `c(processors)'";
13.1 - Windows - 64-bit - PC (64-bit x86-64) - 4

. timer on 1;

. gen var2 = regexr(var1,"<[^<>]+>","");

. timer off 1;

. timer list 1;
   1:     54.88 /        1 =      54.8830

. timer on 2;

. replace var2 = regexr(var2,"<[^<>]+>","");
(730649 real changes made)

. timer off 2;

. timer list 2;
   2:     54.14 /        1 =      54.1400





. count;
730649

. di "`c(stata_version)' - `c(os)' - `c(osdtl)' - `c(machine_type)' - `c(processors)'";
12.1 - Windows - 64-bit - PC (64-bit x86-64) - 4

. timer on 1;

. gen var2 = regexr(var1,"<[^<>]+>","");

. timer off 1;

. timer list 1;
   1:      1.43 /        1 =       1.4300

. timer on 2;

. replace var2 = regexr(var2,"<[^<>]+>","");
(730649 real changes made)

. timer off 2;

. timer list 2;
   2:      0.49 /        1 =       0.4860




--
_______________________________________________________________________
dott. Nicola Tommasi
Centro Interdipartimentale di Documentazione Economica (C.I.D.E)
University of Verona
via dell'Artigliere, 19
37129 Verona (Italy)
tel.: +39-045-8028048
fax.: +39-045-8028047
Skype: nicola.tommasi
________________________________________________________________________

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index