memory-optimization Questions

9

Solved

I've spent a few minutes manually re-ordering fields in a struct in order to reduce padding effects[1], which feels like a few minutes too much. My gut feeling says that my time could probably be b...
Tartuffe asked 15/5, 2009 at 7:57

2

Solved

I come from a Python/Ruby/JavaScript background. I understand how pointers work, however, I'm not completely sure how to leverage them in the following situation. Let's pretend we have a fictitiou...
Doubletalk asked 22/8, 2018 at 4:14

3

I want to store huge amounts of Strings in a Map<String, MagicObject>, so that the MagicObjects can be accessed quickly. There are so many entries to this Map that memory is becoming a bottle...
Winshell asked 15/6, 2016 at 14:0

9

Solved

What are some tips to reduce the memory usage of .NET applications? Consider the following simple C# program. class Program { static void Main(string[] args) { Console.ReadLine(); } } Compil...
Surfbird asked 27/8, 2009 at 19:40

2

Solved

I had a job interview for probation(? I'm not sure if that's the word) and interviewer asked me to tell him what are the differences between structure and class. So I told him everything I knew an...
Fraxinella asked 3/6, 2014 at 9:50

6

Solved

There are often times when you know for a fact that your loop will never run more than x number of times where x can be represented by byte or a short, basically a datatype smaller than int. Why d...
Chukar asked 17/11, 2010 at 13:32

6

Solved

I need a memory efficient int-int dict in Python that would support the following operations in O(log n) time: d[k] = v # replace if present v = d[k] # None or a negative number if not present I...
Tiresome asked 26/10, 2010 at 11:34

5

This is a simple programming question, coming from my lack of knowledge of how PHP handles array copying and unsetting during a foreach loop. It's like this, I have an array that comes to me from a...
Beestings asked 12/1, 2011 at 21:16

1

Solved

Background: The goal is to write a rather large (at least 2048 x 2048 pixels) image file with OpenGL rendered data. Today I first use glReadPixels in order to get the 32-bit (argb8888) pixel data...
Alvarez asked 1/9, 2012 at 8:29

1

Solved

I have written an application in CUDA, which uses 1kb of shared memory in each block. Since there is only 16kb of shared memory in each SM, only 16 blocks can be accommodated overall, right? Though...
Politic asked 10/4, 2011 at 9:10

2

Solved

I'm trying to build a Trie but on a mobile phone which has very limited memory capacity. I figured that it is probably best that the whole structure be stored on disk, and only loaded as necessary...
Birthwort asked 1/10, 2010 at 21:3

9

Solved

I have a question about the std::vector. I have a very memory intensive algorithm where I forsee that predicting vector sizes and reserving enough memory for the vectors in advance will help me a ...
Apiarist asked 6/3, 2009 at 9:19
1

© 2022 - 2024 — McMap. All rights reserved.