space-efficiency Questions

5

Solved

I'd like to pass a sub-set of a C# array to into a method. I don't care if the method overwrites the data so would like to avoid creating a copy. Is there a way to do this? Thanks.
Vi asked 14/1, 2013 at 18:1

7

The closest contenders that I could find so far are yEnc (2%) and ASCII85 (25% overhead). There seem to be some issues around yEnc mainly around the fact that it uses an 8-bit character set. Which ...

3

Solved

I want to initiate a list of N objects with zeros( 0.0 ) . I thought of doing it like that: var TempList = new List<float>(new float[(int)(N)]); Is there any better(more efficeint) way to...
Reconstructive asked 16/7, 2015 at 12:56

1

Solved

I have been studying the best practices are for email verification of a user who is trying to register on a site. (I am running a laravel installation and this is happening in php, though thi...
Punishment asked 25/5, 2014 at 4:38

4

So the space efficiency of Quicksort is O(log(n)). This is the space required to maintain the call stack. Now, according to the Wikipedia page on Quicksort, this qualifies as an in-place al...

4

Solved

I have code that creates and uses a collection such as: List<Map<String, Object>> tableData; This list of maps gets populated with n maps each representing one row in a database. Eac...
Carlow asked 28/10, 2013 at 16:37

3

Solved

I am working on an open source backup utility that backs up files and transfers them to various external locations such as Amazon S3, Rackspace Cloud Files, Dropbox, and remote servers through FTP/...
Bechtel asked 4/3, 2011 at 23:29

3

Solved

I need to create a space efficient 2D array for a large number of 8 bit values. I began writing my class using a few layers of abstraction and generics to allow for code reuse. Once I got to implem...
Sunshade asked 3/4, 2013 at 13:23

3

Solved

What is the difference between these two functions in C? void f1(double a[]) { //... } void f2(double *a) { //... } If I were to call the functions on a substantially long array, would these tw...
Ayannaaycock asked 6/4, 2011 at 21:40

4

Solved

The pickle module seems to use string escape characters when pickling; this becomes inefficient e.g. on numpy arrays. Consider the following z = numpy.zeros(1000, numpy.uint8) len(z.dumps()) len(c...
Longways asked 30/3, 2009 at 1:48

16

Solved

Let's say you have a List<List<Boolean>> and you want to encode that into binary form in the most compact way possible. I don't care about read or write performance. I just want to use...
Salchunas asked 29/1, 2010 at 19:1

6

What all algorithms do you people find having amazing (tough, strange) complexity analysis in terms of both - Resulting O notation and uniqueness in way they are analyzed?
1

© 2022 - 2024 — McMap. All rights reserved.