1h
comment Performance advantages of const qualifier in C11
Really, I was hoping you had a standard reference to back up your claim. :( Try making a program where bar is called with a dynamically allocated array and foo casts away the constness and modifies arr[0]. Does clang still do the optimization? Also, a version where bar is called with the address of an extern global array, and foo is implemented to modify that array through the global pointer.
1h
comment Performance advantages of const qualifier in C11
Does the standard actually permit such an optimization? My expectation is no, and that such an optimization can only safely be done at link time.
1h
comment Standard reference place for C++
... and if you're not on Linux, feeding man strcpy into google leads to online versions of the man pages!
1h
awarded Editor
1h
revised Algebraic Solving and Uniqueness Proofs
deleted 29 characters in body
2h
answered Is it possible to return a pointer to a struct declared in a class?
3h
answered GMP Segfault on Inverse modulus
5h
answered Efficient algorithms to determine the roots of: $p(x) = r^x $ in the finite field $GF(q)$, where $r$ a primitive root of the field
5h
comment Efficient all-pairs set intersection on GPU
... although maybe two (or all three?) of my answers could be combined into an overarching idea? I'll have to think about it, I may do a major revision in my exposition in a couple days.
6h
comment Efficient all-pairs set intersection on GPU
@Giovanni: You're welcome. It's fun to think about these things! And I hope they actually help. :)
6h
answered Efficient all-pairs set intersection on GPU
6h
answered Efficient all-pairs set intersection on GPU
6h
answered Efficient all-pairs set intersection on GPU
7h
comment Efficient all-pairs set intersection on GPU
The sizes of the sets and the size of the universe are likely to be very relevant; you should post examples of the sorts of parameters you're interested in.
9h
comment const in function declaration
Is that first line supposed to be int addTax(const int* anArray, int *pNewArray)?
11h
comment Converting long-math to work with doubles
There might be tricks specific to the thing you're trying to compute; e.g. algorithms concerned with eliminating the lowest bits of the result, rather than the highest bits.
12h
answered Algebraic Solving and Uniqueness Proofs
13h
comment Bringing babies to bar?
Alcohol fumes bother me and I'm a grown-up. I would worry about harm being done to the infant.
13h
comment 23 bit user defined type in c++
You can always use 3 chars (or even just a int32_t) to store your type in -- do you have requirements that make such an approach inadequate? If so, it would help if you explicitly stated those requirements.
15h
comment How do I stop cars from tailgating?
@brhans; Two kinds: (1) if the person behind me (or behind him) finally decides to pass and moves over while pressing the accelerator at the same time I do. (2) the traffic behind me doesn't pass very fast, and I get stuck in the fast lane long enough for more traffic to arrive (and fast lane traffic usually contains people who tailgate worse). I should comment that the vast majority of my driving is on highways and expressways, and it is that setting I had in mind.
1 2 3 4 5