Displaying 20 results from an estimated 300 matches similar to: "profiler and loops"
2020 Feb 26
1
Profiling: attributing costs to place of invocation (instead of place of evaluation)?
Hi
Consider the following example:
f <- function(expr) g(expr)
g <- function(expr) {
? h(expr)
}
h <- function(expr) {
? expr # evaluation happens here
? i(expr)
}
i <- function(expr) {
? expr # already evaluated, no costs here
? invisible()
}
rprof <- tempfile()
Rprof(rprof)
f(replicate(1e2, sample.int(1e4)))
Rprof(NULL)
cat(readLines(rprof), sep = "\n")
#>
2016 Jun 04
1
RProfmem output format
I'm picking up this 5-year old thread.
1. About the four memory allocations without a stacktrace
I think the four memory allocations without a stacktrace reported by Rprofmem():
> Rprofmem(); x <- raw(2000); Rprofmem("")
> cat(readLines("Rprofmem.out", n=5, warn=FALSE), sep="\n")
192 :360 :360 :1064 :2040 :"raw"
are due to some
2003 Mar 26
0
Rprof/UseMethod
I'm having difficulty with Rprof. I have a documentation example test.qss that
runs fine without profiling, but under Rprof,
> Rprof()
> source("test.qss")
Error in standardGeneric("model.matrix") :
UseMethod used in an inappropriate fashion
Luke wrote about a similar circumstance last summer:
# From: Luke Tierney (luke@stat.umn.edu)
# Date: Fri Jul
2002 Jul 19
1
Rprof and setMethod conflict?
I noticed this oddity about R profiling and setMethod.
First, I "test out" Rprof.
> require(methods)
Loading required package: methods
[1] TRUE
>
> Rprof("test.out")
> data.frame("a")
X.a.
1 a
> Rprof(NULL)
So far, so good. Next, I define myClass.
> setClass("myClass", representation(mySlot = "numeric"))
[1]
2004 Jun 28
2
Problem with hasArg and the ... argument (PR#7027)
Full_Name: Jelle Goeman
Version: 1.9.0
OS: mingw32, windows 2000
Submission from: (NULL) (145.88.209.33)
Hi Everyone,
I get very strange results using the function hasArg with the ... function
argument. In my own function:
> gt <- globaltest(X,Y)
> sampling(gt)
works fine, but
> sampling(globaltest(X,Y))
results in:
Error in eval(expr, envir, enclos) : "missing"
2011 Aug 14
0
Improved version of Rprofmem
The Rprofmem facility is currently enabled only if the configuration
option --enable-memory-profiling is used. However, the overhead of
having it enabled is negligible when profiling is not actually being
done, and can easily be made even smaller. So I think it ought to be
enabled all the time.
I've attached a patch doing this, which also makes a number of other
improvements to Rprofmem,
2011 Aug 07
2
[PATCH] kinit minor checkpatch cleanup
coding style fixes.
FIXME: check that compiled bin the same1!!
---
usr/kinit/initrd.c | 3 ++-
usr/kinit/kinit.c | 12 ++++--------
usr/kinit/kinit.h | 20 ++++++++++----------
usr/kinit/name_to_dev.c | 6 +++---
usr/kinit/nfsroot.c | 5 ++---
5 files changed, 21 insertions(+), 25 deletions(-)
diff --git a/usr/kinit/initrd.c b/usr/kinit/initrd.c
index
1997 Aug 05
1
R-beta: Characters in .C
I am having some difficulties using dynamically loaded
C functions on a Sparc 10 with R compiled
using cc (both R-0.49 and R-0.50). I get sporadic errors with the
error message:
Error: character variables must be duplicated in .C/.Fortran,
with C functions which pass character variables.
my C functions look like: anyfunc(char **filename, other variables )
This error message appears about 25%
1997 Aug 05
1
R-beta: Characters in .C
I am having some difficulties using dynamically loaded
C functions on a Sparc 10 with R compiled
using cc (both R-0.49 and R-0.50). I get sporadic errors with the
error message:
Error: character variables must be duplicated in .C/.Fortran,
with C functions which pass character variables.
my C functions look like: anyfunc(char **filename, other variables )
This error message appears about 25%
2016 Mar 17
3
Problem with __builtin_object_size when it depends on a condition
I made a mistake here, I get zero same as you. I want to fix it to get
correct value.
On 16.03.2016. 19:28, Duncan P. N. Exon Smith wrote:
>> On 2016-Mar-16, at 09:39, Strahinja Petrovic via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>>
>> Optimizer doesn't know how to calculate the object size when it finds condition that cannot be eliminated. There is example:
2016 Mar 16
4
Problem with __builtin_object_size when it depends on a condition
Optimizer doesn't know how to calculate the object size when it finds
condition that cannot be eliminated. There is example:
-----------------------------------------------
#include<stdlib.h>
#define STATIC_BUF_SIZE 10
#define LARGER_BUF_SIZE 30
size_t foo(int flag) {
char *cptr;
char chararray[LARGER_BUF_SIZE];
char chararray2[STATIC_BUF_SIZE];
if(flag)
cptr =
2004 May 07
3
Contribution to 3.8.1pl1
Hello,
I added the support for netgroups to be used in the
AllowUsers and DenyUsers parameters. This has some
advantages:
* hostnames or ip addresses need not to be written or
maintained in the sshd_config file, but can be kept
abstract names what also simplifies a bit largescale
openssh installations
* sshd_config needs not change and sshd be restarted
when changing the list of allowed /
2015 Oct 10
3
[PATCH] Extend Multiboot1 with support for ELF64 file format
This patch is just a (shameless) copy from bug #28 [1].
The original patch has been sitting there for a couple of years now,
and it was based on Syslinux v 4.05.
The patch I am posting here is just a re-base on v.6.03. Whichever
inadequate formatting (tabs, trailing spaces...), or any kind of
correction that was required for the original patch to be accepted, is
probably still required now.
1998 Jan 03
1
R-beta: NextMethod(.Generic) bug
I'm a day-old R newbie (but a war-weary S veteran), with couple of
first-day questions:
In R 0.61, this code fails.
Ops.test <- function(e1,e2)
{
e1 <- NextMethod(.Generic)
e1
}
x <- 4
class(x) <- "test"
y <- x < 3
The error message is "Error in NextMethod(.Generic) : negative length vectors
are not allowed.".
I assume it is a bug.
2004 Jul 17
2
gsub(*, perl=TRUE) bug incl. seg.fault (PR#7108)
Experimenting a bit further, I've "found" the following
1) the problem seems only gsub(), not sub()
> sub(" ", "", "b c + d | a * b", perl=TRUE)
[1] "bc + d | a * b"
> gsub(" ", "", "b c + d | a * b", perl=TRUE)
NULL
2) only if perl = TRUE, not otherwise
3) Also modifying the replacement string
2009 Jan 27
1
Segmentation fault in MSetIterator get_weight
Hi,
I'm using xapian with c# and mono and i'm having a segfault in get_weight.
When i print the index variable, the value is clearly too high.
I think something write over it. Do you have any idea on how i could
trace the beginning of the segmentation fault ?
Thanks,
--
Yann
2009 Mar 31
1
[PATCH 1/1] CORE/cache: add cache priority parameter
From: Gene Cumm <gene.cumm at gmail.com>
CORE/cache: add cache priority parameter; Passing in DX=0 forces the
cache entry to stay at the least recently used spot. Any other value
allows it to continue on previous behavior of most recently used
position in the list. Change ldlinux.asm and extlinux.asm (the only 2
users of cache) to pass in DX=1. Push/Pop DX unless it's definitely
safe
2017 Jun 27
0
Seg Fault memory violation
Greetings all,
Recently ran into a seg fault the keeps reoccurring whenever R-java is used (I believe). Not sure if this is an R issue or an openjdk issue so I'm trying to cover all bases with this report. I tried downgrading R version from 3.4.0 to 3.3.3 with the same results. Also tried downgrading java version from 1.8 to 1.7 with no luck. Running on a fully updated CentOS 7 x86_64,
2016 Mar 27
2
sys.function(0)
As I understand
https://stat.ethz.ch/R-manual/R-devel/library/base/html/sys.parent.html
sys.function(n) returns the function associated with stack frame n.
Since frame 0 is defined as .GlobalEnv which is not associated with a
function, I would expect this to always return NULL. However, it does not:
> sys.function()
NULL
> f <- function(x) sys.function(x)
> f(0)
function(x)
1998 May 15
1
couldn't find function "print.tframe"
I have an object with an attribute "tframe" for which there is a generic method
print.tframe and also a method print.tframe.default defined in a library.
However, when I use attributes(object) I get the message
$tframe
Error: couldn't find function "print.tframe"
It's as if <primitive: attributes> is not looking through the search list?
Any suggestions?