10,092 reputation
12343
bio website
location
age
visits member for 3 years, 10 months
seen 24 mins ago

16h
comment How to work around Java's lack of pointers to pointers when working with linked data structures?
@Telastyn Hush, don't change the question then your answer turns out wrong ;-) I'm pretty sure doubling the number of cache misses is measurable, and "unlinked" (by which I assume you mean in an array, using indices rather than pointers?) implementation are rather obscure: The JDK and the C++ standard library both have "linked" BSTs and no unlinked variant.
Sep
20
comment What Is λ-calculus essentially?
@FlorianF I'm almost certain that there are such non-canonical (up to alpha equivalence) terms, but if so, they can be avoided by careful construction of the program.
Sep
19
revised What Is λ-calculus essentially?
added 183 characters in body
Sep
19
answered What Is λ-calculus essentially?
Sep
19
comment How to find out how many instructions per second modern CPUs can process?
Be aware that the number greatly varies by the kinds of instructions, and often also by the interaction of various instructions and how well the cache works. The numbers you'll find are often best-case (all stages of the pipeline fully utilized at all times) and not necessarily representative of real programs. Some instructions take more clock cycles, some cause pipeline stalls, some memory accesses cause the CPU to wait idly for main memory, and sometimes multiple instructions can be issued in one clock cycle.
Sep
16
comment Static typing vs. dynamic typing
#1 and #2 are high octane flame bait. #3 is bad subjective aside from a few objective criteria (such as "can it be parsed easily"), and #5 is under-specified and possibly too subjective.
Sep
15
comment Why do some programming languages have break statements, but not higher-order break statements?
When I use break and continue, they express my intent just fine thankyouverymuch.
Sep
13
comment What is more efficient, a single square root or multiple divisions?
@BasileStarynkevitch Software emulation is slow, but not that much slower (for n = 1000 it would have to be 15x slower than an integer division which likely won't have hardware support either) and hand-rolling a square root for integers is quite feasible (for anyone who had enough calculus to know the bisection method) and rather efficient (about k iterations for n < 2^k with each iteration only requiring a few additions and a single multiplication).
Sep
11
comment How does the Common Language Runtime improve performance?
Though in all fairness, modern GCs make a trade off to achieve that performance: They collect less eagerly, so the total memory footprint is usually higher. Also, efficiency has two sides: Throughput and latency, and most designs heavily optimize for one at the expense of the latter (e.g. stop the world to improve throughput, or guarantee maximum pause times at the cost of abyssal throughput).
Sep
10
comment How does the Common Language Runtime improve performance?
@neelsg You're right, it doesn't, because (as I wrote in a comment earlier) I don't even know compared to what it's supposed to be faster. So instead I focused on the misconception in your question (that it would be slower).
Sep
10
comment Why did the creators of the Internet Protocol decide to use IP addresses to identify a particular computer?
@JerryRockwell You do realize that MAC addresses, which come closest to what you describe, can also be spoofed? In other words, in that world it would probably only take a utility program and a lucky guess to get a new, working ID. On the other hand, if proxies and VPNs really do become impossible, a lot of honest people are screwed too.
Sep
10
comment Why did the creators of the Internet Protocol decide to use IP addresses to identify a particular computer?
I wonder what problems you think this would solve or simplify.
Sep
10
comment Unevenly distributed random number generation
+1 This is the easy way for small, discrete domains. Obviously it doesn't work for continuous (well, as continuous as you can get on a digital computer) and/or analytical distributions. Then you need an analytical solution like the inversion method.
Sep
10
answered How does the Common Language Runtime improve performance?
Sep
10
comment How does the Common Language Runtime improve performance?
Oh boy, what a poorly written article. This would be so much easier to support or debunk (or even decide which to pursue) if it said relative to what there are performance improvements.
Sep
6
comment What is ASM.js and what does it mean for everyone?
@romkyns JIT compilation of asm.js to machine code by browsers, or JIT compilation to asm.js (by a JavaScript program)? For the former, at least in Firefox, the machine code generation facilities of the pure-JS JIT compilers are re-used. Since asm.js can only call into JS, perform arithmetic, and read/write a heap array with index-in-range checks the security is about as good as the security of JS execution. For the latter, you just generate asm.js source code and let the browser execute it, and there are no additional security implications beyond what I mentioned before.
Sep
5
reviewed Approve suggested edit on Divide and Conquer algorithms – Why not split in more parts than two?
Sep
5
comment Null checking whilst navigating object hierarchies
@Amorgos As in this != null? I'm no Java guru but I think the method invocation will throw before the method is entered if textView is null. In case you refer to other things that might be null inside setText, consider that those checks too can be buggy/incomplete.
Sep
5
comment Null checking whilst navigating object hierarchies
Well, implementation B silently swallows legitimate bugs manifesting as null pointer exceptions in any of the methods or on the textView.* access.
Sep
4
comment Is 'design with types first' ultimately the same as 'design with interfaces first'?
I agree with the "afterthought". But everything before that just seems like a rant about the open world assumption made by interfaces (and type classes too, mind you!) and how it's worse than a closed world assumption (conveniently ignoring the other side of the expression problem coin).