Tag Info

New answers tagged

6

Historically (perhaps by rewriting parts of it), it was the contrary. On the very first computers of the early 1970s (perhaps PDP-11) running a prototypical embryonic C (perhaps BCPL) there was no MMU and no memory protection (which existed on most older IBM/360 mainframes). So every byte of memory (including those handling literal strings or machine code) ...


1

Yes, there would still be a need for caching, regardless of memory technology. What you will find is that RAM access latencies are order of magnitude greater than the underlying chip access latencies, while L1 cache access latency is pretty much just the chip access. This is because when you access RAM there is both a narrower bus and a lot more work to ...


1

That 1000 times faster is a rather unhelpful number without specifying what metric it refers to. Fortunately, Ordous noticed that they do specify that the latency is about 1000 times better than NAND flash at about 3 minutes into this video. Throughput is a measure of how much data you can transfer in a given time period. It's measured in things like ...


2

I ran some tests on my RPi and came to these conclusions: Looping 100 times over a float LUT with size 360 (ie 100 full rotations with 1 deg resolution or 360*100 sin lookups and 360*100 cos lookups) the LUT is approx. 10-20 times faster than calculating sinf and cosf directly in the loop. Using a double LUT with same size makes the LUT approx. 40 times ...


1

Most modern languages will perform table lookups rather than calculate sin and cos values. If the value is between two table values, it'll average the two together (weighted average). If I'm not mistaken, the same should be true for calling sin/cos in a raspberry pi program, though it is still technically performing a table lookup that you could ...


3

As far as I understand on modern CPUs you're better off just calculating sin and cos each time because the CPU is many times faster than memory access anyway. Sure, main memory access costs many CPU cycles, where a CPU would be idle waiting for data. But that completely ignores that modern CPUs have memory caches (some have 3 levels of cache on the ...


1

It depends if you are in debug or release mode. In release mode, as Pedro said there is HeapAlloc/HeapFree which are kernel functions, while in debug mode (with visual studio) there is a hand written version of free and malloc (to which new/delete are re-directed) with thread locks and more exceptions detection, so that you can detect more easily when you ...



Top 50 recent answers are included