similar to: Speeding up squaring of vectors

Displaying 20 results from an estimated 4000 matches similar to: "Speeding up squaring of vectors"

2010 Aug 21
1
Speed improvement to evalList
I've been inspired to look at the R source code by some strange timing results that I wrote about on my blog at radfordneal.wordpress.com (see the posts on "Speeding up parentheses..." and "Two surprising things...". I discovered that the strange speed advantage of curly brackets over parentheses is partially explained by an inefficiency in the evalList and
2010 Aug 23
1
Speed improvement to PROTECT, UNPROTECT, etc.
As I mentioned in my previous message about speeding up evalList, I've been looking at ways to speed up the R interpreter. One sees in the code many, many calls of PROTECT, UNPROTECT, and related functions, so that seems like an obvious target for optimization. Indeed, I've found that one can speed up the interpreter by about 10% by just changing these. The functions are actually macros
2010 Sep 03
0
Pointer to fourteen patches to speed up R
I've continued to work on speeding up R, and now have a collection of fourteen patches, some of which speed up particular functions, and some of which reduce general interpretive overhead. The total speed improvement from these patches is substantial. It varies a lot from one R program to the next, of course, and probably from one machine to the next, but speedups of 25% can be expected in
2010 Sep 03
1
Fourteen patches to speed up R
I've continued to work on speeding up R, and now have a collection of fourteen patches, some of which speed up particular functions, and some of which reduce general interpretive overhead. The total speed improvement from these patches is substantial. It varies a lot from one R program to the next, of course, and probably from one machine to the next, but speedups of 25% can be expected in
2009 Jun 12
2
Squaring one column of data
Hi, A fairly basic problem I think, here although searching the inetrnet doesn't seem to reveal a solution. I have a dataset with two columns of real numbers. It is read in via read.table. I simply need to square the data in the second column and then plot it. I have tried extracting the second column (b <- z[2]) and then squaring it and merging it to a variable which is the first column
2010 Aug 23
1
Speeding up matrix multiplies
I've looked at the code for matrix multiplies in R, and found that it can speeded up quite a bit, for multiplies that are really vector dot products, and for other multiplies in which the result matrix is small. Here's my test program: u <- seq(0,1,length=1000) v <- seq(0,2,length=1000) A2 <- matrix(2.1,2,1000) A5 <- matrix(2.1,5,1000) B3 <- matrix(3.2,1000,3) A4 <-
2010 Aug 23
1
Internal state indicating if a data object has NAs/no NAs/not sure (Was: Re: Speeding up matrix multiplies)
Hi, I'm just following your messages the overhead that the code for dealing with possible NA/NaN values brings. When I was setting up part of the matrixStats package, I've also though about this. I was thinking of having an additional logical argument 'hasNA'/'has.na' where you as a user can specify whether there is NA/NaN:s or not, allowing the code to avoid it or not.
2010 Aug 26
2
Speeding up transpose
I've looked at how to speed up the transpose function in R (ie, t(X)). The existing code does the work with loops like the following: for (i = 0; i < len; i++) REAL(r)[i] = REAL(a)[(i / ncol) + (i % ncol) * nrow]; It seems a bit optimistic to expect a compiler to produce good code from this. I've re-written these loops as follows: for (i = 0, j = 0; i<len; i +=
2010 Aug 23
1
Speeding up sum and prod
Looking for more ways to speed up R, I've found that large improvements are possible in the speed of "sum" and "prod" for long real vectors. Here is a little test with R version 2.11.1 on an Intel Linux system > a <- seq(0,1,length=1000) > system.time({for (i in 1:1000000) b <- sum(a)}) user system elapsed 4.800 0.010 4.817 > system.time({for (i
2007 Nov 07
2
Adding submenus to existing consol GUI menu
If possible I would like to add two sub-menus to the R Console under Windows. For example, I would like to add: winMenuAddItem("File", "Load CSV...", "loadCSV()") winMenuAddItem("File", "Save CSV...", "saveCSV()") and have them appear under the initial 'File' item rather than add a new 'File' menu item. I seem to
2008 Apr 05
2
Adding a Matrix Exponentiation Operator
Hi all I recently started to write a matrix exponentiation operator for R (by adding a new operator definition to names.c, and adding the following code to arrays.c). It is not finished yet, but I would like to solicit some comments, as there are a few areas of R's internals that I am still feeling my way around. Firstly: 1) Would there be interest in adding a new operator %^% that performs
2011 Apr 04
1
[LLVMdev] opt -dot-cfg
I use "opt -dot-cfg sample.bc" command to view cfg, but I encountered the following warning. WARNING: You're attempting to print out a bitcode file. This is inadvisable as it may cause display problems. If you REALLY want to taste LLVM bitcode first-hand, you can force output with the `-f' option. I see unmeaning thing when use -f , in additinal I've installed graphvis
2001 Mar 02
1
inc function .. more generally, var arguments
Hi I'd like to be able to write a simple 'increment' function (like inc in pascal or ++ in C++) that takes the argument and increments it 'permanently' ie so that z<-1; inc(z) # no assignment; z #2 I can see how to do it with a global variable but that is not what I want - I want to modify the object that is the actual argument.. I have looked at assign(), <<
2009 Aug 10
0
Speeding up a bootstrap routine
I have written the R code below to perform White's Data Mining Reality Check (DMRC) but as it stands at the moment it is painfully slow. It is written as a function as I call it many times from a script file with different data input, and the output is sunk() to a text file. Could anyone suggest improvements to the code to increase its speed? boot_white_test <- function(data) {
2012 Jul 20
0
[External] Re: Speeding up a loop
"Reith, William [USA]" <reith_william@bah.com> wrote on 07/20/2012 09:52:02 AM: > Would this matrix eat up memory making the rest of my program > slower? Each x needs to be multiplied by a matrix and the results > checked against a set of thresholds. Doing them one at a time takes > at least 24 hours right now. > > Optimizing a program is not my thing.
2017 May 15
0
stopifnot() does not stop at first non-TRUE argument
>>>>> Serguei Sokol <sokol at insa-toulouse.fr> >>>>> on Mon, 15 May 2017 16:32:20 +0200 writes: > Le 15/05/2017 ? 15:37, Martin Maechler a ?crit : >>>>>>> Serguei Sokol <sokol at insa-toulouse.fr> >>>>>>> on Mon, 15 May 2017 13:14:34 +0200 writes: >> > I see in the archives that
2001 Jul 10
0
speeding up aperm/ adding repmat
Hi, I have noticed that aperm is very slow, and I wondered if there was a way of speeding it up. Let me tell you a bit about the context of my problem, because perhaps I shouldn't be using aperm at all. The context is probabilistic inference in graphical models. One of the most fundamental operations is two compute an element-wise multiplication of two arrays of different sizes, say A and B.
2006 Jun 29
3
Speeding up Prototype''s $$ Selector
Just a quick heads up that Sylvain Zimmer has posted a performance upgrade for Prototype''s $$ selector, making the function up to 20 times faster. This could be just the thing I''ve been looking for recently as a site I''m currently developing makes heavy usage of that $$ selector and I have noticed that this can lead to a noticeable lag on page load. See
2006 Apr 02
3
speeding up a recursive function
Hi All, is there any general advice about speeding up recursive functions (not mentioning 'don't use them')? Regards, Federico Calboli -- Federico C. F. Calboli Department of Epidemiology and Public Health Imperial College, St. Mary's Campus Norfolk Place, London W2 1PG Tel +44 (0)20 75941602 Fax +44 (0)20 75943193 f.calboli [.a.t] imperial.ac.uk f.calboli [.a.t]
2018 Sep 25
1
Users cannot change their passwords
On 25.09.2018 15:44, Rowland Penny via samba wrote: > On Mon, 24 Sep 2018 21:22:06 GMT > "Torin Woltjer" <torin.woltjer at granddial.com> wrote: > >> Thanks for the quick reply, I believe I am using MIT based on log >> file names; but is there a better way to tell? I'm not very >> knowledgeable about the distinction between MIT and Heimdal regarding