What do Clustered and Non-Clustered index actually mean?

With a clustered index the rows are stored physically on the disk in the same order as the index. Therefore, there can be only one clustered index. With a non clustered index there is a second list that has pointers to the physical rows. You can have many non clustered indices, although each new index … Read more

How can you speed up Eclipse?

The three most influential factors for Eclipse speed are: Using the latest version of Eclipse (2020-06 as on 26 June 2020) Note that David Balažic’s comment (July 2014) contradicts that criteria which was working six years ago: The “same” workspace in Indigo (3.7.2) SR2 loads in 4 seconds, in Kepler SR2 (4.3.2) in 7 seconds … Read more

\d less efficient than [0-9]

\d checks all Unicode digits, while [0-9] is limited to these 10 characters. For example, Persian digits, ۱۲۳۴۵۶۷۸۹, are an example of Unicode digits which are matched with \d, but not [0-9]. You can generate a list of all such characters using the following code: var sb = new StringBuilder(); for(UInt16 i = 0; i … Read more

How do I profile a Python script?

Python includes a profiler called cProfile. It not only gives the total running time, but also times each function separately, and tells you how many times each function was called, making it easy to determine where you should make optimizations. You can call it from within your code, or from the interpreter, like this: import … Read more

Why does changing 0.1f to 0 slow down performance by 10x?

Welcome to the world of denormalized floating-point! They can wreak havoc on performance!!! Denormal (or subnormal) numbers are kind of a hack to get some extra values very close to zero out of the floating point representation. Operations on denormalized floating-point can be tens to hundreds of times slower than on normalized floating-point. This is … Read more

Is < faster than

No, it will not be faster on most architectures. You didn’t specify, but on x86, all of the integral comparisons will be typically implemented in two machine instructions: A test or cmp instruction, which sets EFLAGS And a Jcc (jump) instruction, depending on the comparison type (and code layout): jne – Jump if not equal … Read more