back
user profile

vardump

7,951karma·3,611submissions·March 15, 2012
recent activity (3,611 total)
comment
In order to get maximum throughput, you also might need to do SIMD loads (and stores). On Haswell this means two AVX loads, 64 bytes per clock cycle (two 32 byte loads). I think with with scalar code,…
11y ago·view thread
comment
Throw zero-terminated strings away too, please. Scanning sequential bytes is very slow and has caused so many bugs.
11y ago·view thread
comment
> I dunno. I've run into too many programmers on the other end of the spectrum. They're reluctant to take advantage of the genuinely zero-cost abstractions that today's excellent opt…
11y ago·view thread
comment
Not always faster. Try comparing qsort to stl::sort... Hint: stl::sort is a lot faster. It can inline the comparison function. Ok, it just shows how slow function pointers are. I'm assuming compi…
11y ago·view thread
comment
C++ bugs are sometimes - too often - faster to find even from disassembly than from source code . Seriously. Yes, it's a very slow approach. But you can see what's really going on, and the …
11y ago·view thread
comment
> - and 2 bytes per character stored No, 2 bytes per code unit. A single UTF-16 character requires one or two code units. So a single "character" (code point in Unicode terminology) is ei…
11y ago·view thread
comment
> When the half dozen browsers that represent about 99.9% of the browswer market all use C++, perhaps the explanation is not "They're all wrong." I didn't say they're wrong…
11y ago·view thread
comment
Shame you're downvoted, because you're pretty much right. Don't get me wrong, correct code can very well be written in C/C++. It's just 95% of the programmers using those lang…
11y ago·view thread
comment
Amen. Control over memory layouts. That would be truly useful for getting reasonable performance. And dropping memory required by the reference hell. Java doesn't support arrays for anything but …
11y ago·view thread
comment
Well, last I checked, the cost for an indirect function call for simple operations was about 5-10x compared to inlining. Each function call constitutes of at least two branches - the call and return. …
11y ago·view thread
comment
Operator overloading is a syntactic sugar trick that hides the real method call. Nothing more, nothing less. It's useful in vector math , complex number math , matrix math .
11y ago·view thread
comment
Sure high performance generic JITs are not simple. NOTE: Following is meant for dynamically dispatched lightweight methods, like those that just read (or compare) or store (or modify) some simple fiel…
11y ago·view thread
comment
Yes. If you can generate code on the fly [1], you can handle a subset of cases very efficiently. [1]: JIT. Just in case some people confuse concepts, I'm not talking about JVM, virtual machines a…
11y ago·view thread
comment
If only Visual Studio/C++ used AST! At least in Visual Studio 2012/C++, context sensitive search doesn't often work at all. Try to get context for something common like ".create&qu…
11y ago·view thread
comment
> Right click -> Find all references doesn't do that faster than typing out the grep command? Yes, IDE is not generally faster. Find all references is not faster for me in most real life sc…
11y ago·view thread
comment
I often dislike C++ and Java (note: did not say object oriented programming), because the logic tends to be distributed in so many different files and locations. The abstractions, which should be bene…
11y ago·view thread
comment
This depends entirely on the specific code you're talking about. If the compiler finds out a specific optimization is applicable for a certain block of code, then it uses it. So your question can…
11y ago·view thread
comment
Games, at least what I've seen, usually just don't use 3x(8|16|32) bits per pixel, if it's not needed as alpha. It's pretty rare to pack 24/48/96-bit pixels in memory. Tr…
11y ago·view thread
comment
It's very useful if you need to get all the performance out of the CPU. Compilers are good for generating code for 10 year old CPUs. It's usually pretty trivial to get 2x improvement. Th…
11y ago·view thread
comment
Sometimes you get 40x speedup. Sometimes you gain nothing.
11y ago·view thread
comment
I guess this is one of those cases where you just need to get your hands dirty to really understand it. Can you do reasonably efficient [arbitrary size] fixed point arithmetic on your hardware? Do you…
11y ago·view thread
comment
I have a lot of respect for Rob Pike. Doing what he says guarantees correct operation in typical cases, when the memory is cacheable. If CPU arch doesn't support unaligned loads, the compiler mus…
11y ago·view thread
comment
> Everything else is pretty much a dude screwing around with getpixel/setpixel That's not very constructive. Can you point where he did that? For reference, source code is here: https:&#…
11y ago·view thread
comment
So how many I can do if for each FMA I also receive 16 bytes of data from a neighboring node and send 16 bytes of data to a neighboring node? Or is the data transfer free, is the neighboring node memo…
11y ago·view thread
comment
I wonder what kind of penalties there are for transmitting data to neighboring nodes. Same for receiving. If every node does for example receives data from a neighboring node, does a single fused mult…
11y ago·view thread
comment
Binary (compiled code) JIT compilation could very well be faster than direct execution. I'm not aware of anyone currently using these techniques for running native code faster. Yet. You can also …
11y ago·view thread
comment
More cores buys you only so much unless memory bandwidth and preferably number of memory subsystems is also increased (NUMA sockets). It's often easy to consume all L3/memory bandwidth with …
11y ago·view thread
comment
Intel makes a famous AOT compiler, ICC. https://software.intel.com/en-us/intel-compilers
11y ago·view thread
comment
> At the high end, per-core performance hasn't increased significantly. When comparing aforementioned CPUs (Intel Core i7 980X and Intel Core i7 5930K), I'd call 4->16 FLOPS per clock …
11y ago·view thread
comment
I think that's what the SIMD instructions largely do. Like AVX-512 when talking about Skylake. A more direct interface to the "monster within". The monster got bigger, so there's a…
11y ago·view thread