7 ms·
The real quote would have been: > Do CPU designers spend area on niche operations such as _binary-field_ multiplication? Sometimes, yes, but not much area. Giv
by Narann 10y ago
The real quote would have been:
> Do CPU designers spend area on niche operations such as _binary-field_ multiplication? Sometimes, yes, but not much area. Given how CPUs are actually used, CPU designers see vastly more benefit to spending area on, e.g., vectorized floating-point multipliers.
So, CPUs are not "optimized for video games", they are optimized for "vectorized floating-point multipliers". Something video game (and many others) benefits from.
- nemothekid 10y agoWhy are they optimized for vectorized floating-point multipliers? Does the CEO of Intel just tell all the engineers to do this because he likes multiplication?
- daveguy 10y agoThey are optimized for that because a lot of algorithms can make use of them, from quicksort/mergesort through image rendering and encryption. It is an easy optimization from a hardware perspective -- simple repetitive hardware structure. This is why GPUs are so powerful and games are not the only thing that benefits from this type of optimization. Matrix multiplication is also used in signal processing. The CEO asked, how can we optimize the use of our hardware for the most benefit? And SIMD with wide pipes is at the top of the list. Most of the post is about all the new algorithms that can take advantage of the hardware push. The hardware push is there because it is an easy use of hardware resources. This is also an optimization that compilers can readily take advantage of on a small scale (similar to pipelining) so the combination of benefit + ability to use + simplicity/low resource use makes it an inevitability.
- mcguire 10y agoA sort that uses vectorized floating point multiplication?
- sbierwagen 10y agoFrom 2008: http://www.vldb.org/pvldb/1/1454171.pdf http://www.vldb.org/pvldb/1/1454171.pdf Also: http://researcher.watson.ibm.com/researcher/files/jp-INOUEHRS/PACT2007-SIMDsort.pdf http://researcher.watson.ibm.com/researcher/files/jp-INOUEHR... and https://github.com/NumScale/boost.simd https://github.com/NumScale/boost.simd
- sapphireblue 10y agoBecause CPUs are designed around benchmarks representative of real workloads people are running on their computers. Naturally, multimedia and games are a large part of these workloads, this is what drives SIMD adoption.
- pavanky 10y agoNo, it's done because it covers two of their largest markets Gaming machines and clusters used for scientific / finance applications.
- fla 10y agoI'd say modern CPUs are not optimized for anything in particular. They are simply okay at doing general purpose stuff. Anything more specialized exists in the form of DSPs GPUs, etc..
- robotresearcher 10y agoThat's ignoring the history. The definition of 'general purpose stuff' includes things which used to be considered specialized. FPUs used to be physically separate optional add-ons. They were quickly absorbed into the main CPU around the time that the spreadsheet became the killer app. Then SIMD was added when 'multimedia' became a requirement. Now pretty good GPUs are integrated too. Of course all these capabilities are multi-purpose, but they were not core functionality originally.
- fla 10y agoI agree. Nontheless, modern cpus are nonetheless designed to be acceptably good at different things (versus being extremely efficient at solving a specific task).
- fla 10y agoI agree. Nonetheless, modern cpus are designed to be acceptably good at different things (versus being extremely efficient at solving a specific task).
- garaetjjte 10y agoReally spreadsheets used floating point? That sounds like terrible idea.
- robotresearcher 10y agoThat's a good point. I don't know the answer. Optional PC FPUs and the rise of spreadsheets were contemporaneous in the late 1980s but perhaps not related. edit: I checked. Microsoft at least used floating point in Excel until much later, until at least 2013. With the expected limitations. https://support.microsoft.com/en-ca/kb/78113 https://support.microsoft.com/en-ca/kb/78113
- tjl 10y agoThey're optimized for single-precision linear algebra. If you need double-precision all those optimizations go out the window and you're left on your own.
- vardump 10y ago> They're optimized for single-precision linear algebra. If you need double-precision all those optimizations go out the window and you're left on your own. Not true at all on modern X86. You just get half the FLOPS by using double precision instead of single precision -- 16 double precision FLOPS per core per cycle. Which is very good considering there's also twice as much data to process. You could rather say X86 CPUs are highly optimized for double precision performance.
- tjl 10y agoThat's great. It's been a while since I did a lot of simulations (which used double precision) so I didn't know that had changed. I still wouldn't say that they're highly optimized, though.
- fsloth 10y agoPlease see http://agner.org/optimize/optimizing_cpp.pdf http://agner.org/optimize/optimizing_cpp.pdf chapter 7.3 for detailed technical discussion on this. "In most cases, double precision calculations take no more time than single precision."
- Narishma 10y agoOnly for scalar calculations. Vectorized they take about double the amount of time.