Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
1 answer
38 views

The XFS filesystem has (or used to have) a IOCTL named XFS_IOC_RESVSP64 for reserving space: You called it with a given file descriptor, and the XFS driver reserved an amount of space use by for your ...
0 votes
1 answer
45 views

The methods AI showed me are not working. However, one method mentioned by AI seems to be usable, but it is private: private CodedOutputStream(byte[] buffer, int offset, int length) So, how can I ...
0 votes
1 answer
52 views

I am trying to optimize a code, which has allocations inside a function that is repeatedly called in a loop. I ran some performance tests using jupyter and results were counterintuitive for me. As a ...
4 votes
2 answers
253 views

I have been testing two methods of array creation and initialization in JavaScript using Node.js. One method involves dynamically pushing elements into the array, while the other method involves pre-...
1 vote
1 answer
54 views

salaries <- list(leaders = c(250, 200), assistant = 100, members = c(300, 200, 180, 120, 100)) > vapply(salaries, range, c(min=0, max=0)) leaders assistant members min 200 100 100 ...
0 votes
1 answer
244 views

I have an implementation in a Rust struct that builds a very large string that will ultimately be written to a file. I wondered if this could be sped up by ensuring the string variable has the ...
smolloy's user avatar
  • 368
2 votes
0 answers
71 views

I run into an issue while trying to understand the difference (in terms of computational time) between re-allocate a structure each time it is needed, against allocate a priori and then re-fill (a ...
1 vote
1 answer
262 views

I have been wondering how user defined Matlab classes as handle subclasses works. It seems, and also from what I read, that in some cases they reference to each other that might be unexpected or ...
2 votes
1 answer
264 views

I am running a simulation in R, in which the outputs should be stored in numeric vectors in a variable of the type list. However, I am wondering why when I preallocated the list with numeric vectors, ...
2 votes
1 answer
161 views

I'm looking for the most efficient method of pre-allocating a logical array in MATLAB without specifying true or false at the time of pre-allocation. When pre-allocating e.g. a ×ばつ5 numeric array I can ...
3 votes
2 answers
317 views

I implemented a finite differences algorithm to solve a PDE. The grid is a structured 2D domain of size [Nx, Nz], solved Nt times. I pre-allocate the object containing all solutions: sol = zeros(Nx, ...
0 votes
1 answer
721 views

I want to preallocate a matrix in matlab to get rid of out of memory error, but how can i use preallocating for a while loop? we use preallocating for a for loop like this: m=10000; x=zeros(m,1) for ...
0 votes
0 answers
161 views

My code generates 10 videos in a for loop using the VideoWriter function. I know how to pre-allocate arrays but I am not sure how to make pre-allocation for VideoWriter files. writerObj file in the ...
4 votes
2 answers
248 views

If we write, for example: x = int8.empty(0,5) whos x outputs: % Name Size Bytes Class Attributes % x 0x5 0 int8 Thus, we obtain a 0x5 empty array of class int8. ...
obchardon's user avatar
  • 10.8k
0 votes
0 answers
349 views

I am confused about the preallocation in R. We all know that preallocation will be much faster and it can solve the problems of over-memory. However, if we want to obtain a list with an unknown length,...
rio's user avatar
  • 9

15 30 50 per page
1
2 3 4

AltStyle によって変換されたページ (->オリジナル) /