Tag Info

New answers tagged

5

If you need to ask the question, you don't need to know the answer. If you had a profiler, profiled your code, and found this to be a hotspot, you could trivially find out the answer yourself by simply changing the code and profiling again. Since you haven't done that, we can readily deduce that in fact, you have no such hotspot and no such profiler, and ...


0

If there's a "gateway" use case for fragment skeptics, it's probably dialogs. The long-deprecated methods showDialog(...), onCreateDialog(...), etc., were nice in that the framework would call them to automatically destroy and recreate your dialogs when the hosting activity was destroyed and recreated. If you create your own dialogs directly, you have to ...


0

Analyzing complex algorithms requires lot mathematical background. For a refresher on analysis of standard algorithms you can refer to books. If you need a starting point for analysis of algorithms i would suggest to read some books on algorithms. The best book i can refer for analyzing algorithms is Introduction to Algorithms. If you would like to attend ...


-1

What you can try is to find the analytical expression that is equal to the cost of the algorithm you are working with. In many cases, this expression might be a sum (usually for nested loops). However, for a recursive algorithm, you might express it's cost with a recursive formula that you will have to solve. For example, the cost of a binary search may be ...


1

In short: they try to minimize random memory access and jumps between pieces of code in memory to play nicely with CPU cache. According to HHVM Performance Status they optimized most frequently used data types, which are strings and arrays, to minimize random memory access. The idea is to keep data pieces used together (like items in an array) as close to ...


7

They replaced TranslatorX64’s tracelets with the new HipHop Intermediate Representation (hhir), and a new indirection layer in which resides the logic to generate hhir, which is actually referred to by the same name, hhir. From a high level, it is using 6 instructions to do the what required 9 instructions before, as noted here: "It begins with the same ...


-3

I have seen at least two impressive mmo's done in Java, to say its not fast enough for games is a misnomer. Just because game designers favor C++ more over other languages says it is simply not just Java related, it just means said programmers have never really dabbled with any other programming languages/paradigms. Anything in any language as advanced as ...


2

You have to have knowledge of whether any given user has voted on any given post and on any given comment. This means that you have to introduce a new user_post_votes table with a user_id column and a post_id column, as well as a user_comment_votes table with a user_id column and a comment_id column. If it is only possible to upvote, then the presence of a ...



Top 50 recent answers are included