Open DorisAmoakohene opened 1 month ago
I don't think it is a good example because there is no asymptotic complexity class difference. it would be better to show an example where one curve is clearly linear, other is clearly quadratic.
very well, will investigate other packages and send another result
regex TRE vs PCRE vs RE2 would be good
hi @tdhock is this what you meant?
subject.size.vec <- unique(as.integer(10^seq(0, 3.5, l=100)))
atime.list <- atime::atime( N=subject.size.vec, # Vector of sizes. setup={ # Run for each size, before timings: subject <- paste(rep("a", N), collapse="") pattern <- paste(rep(c("a?", "a"), each=N), collapse="") }, times=10, seconds.limit=0.1,
PCRE.match=regexpr(pattern, subject, perl=TRUE), TRE.match=regexpr(pattern, subject, perl=FALSE), RE2.match=re2::re2_match(subject, pattern) )
plot(atime.list)
(best.list <- atime::references_best(atime.list)) plot(best.list)
yes I think that example would be good because you can clearly see the difference between PCRE (exponential time) and others (cubic) please remove ".match" from the names also you can probably remove RE2 to simplify (it is the same N^3 asymptotic time complexity as TRE)
or like this
ok. the first plot x min is 10 but would be better 1 both probably need bigger text
ok. the first plot x min is 10 but would be better 1 both probably need bigger text
there is no N=1 on x axis?
why do I get this error when I run this
atime.list[["measurements"]][N==323, .(expr.name, seconds=median, kilobytes)]
> pred.list <- predict(best.list, seconds=1e-2, kilobytes=10)
Error in `[.data.table`(data.table(unit = names(L)), , { :
kilobytes is not a valid unit; argument names of predict must be one of these valid units: seconds
your machine does not support memory measurement for some reason
@tdhock including code in the overleaf like
\begin{Schunk}
\begin{Sinput}
subject.size.vec <- unique(as.integer(10^seq(0, 2, l=10)))
atime.list <- atime::atime(
N = subject.size.vec,
setup = {
subject <- paste(rep("a", N), collapse="")
pattern <- paste(rep(c("a?", "a"), each=N), collapse="")
},
times = 10,
seconds.limit = 0.1,
PCRE = regexpr(pattern, subject, perl=TRUE),
TRE = regexpr(pattern, subject, perl=FALSE)
)
\end{Sinput}
\end{Schunk}
is giving me errors like:
LaTeX Error: File Sweave.sty' not found.
LaTeX Error: Environment shunk undefined.
./DorisAmoakohene.tex, 230
You have created an environment (using \begin{…} and \end{…} commands) which is not recognized. Make sure you have included the required package for that environment in your preamble, and that the environment is spelled correctly.
I have spent time looking at it and find solution buts taking too much time, Can you assist
you need to install Sweave.sty in your latex on overleaf you should upload the file
@tdhock see this and let me know what you think about using this as the figure and 2
This plot above are plotting for ;
which one looks good to show