Re: Zahl gerade oder ungerade?



Respekt...

So tief bin ich noch nie in die Materie eingestiegen.


"Thomas Scheidegger [MVP]" <spam.netmaster@xxxxxxxxxxxxxx> schrieb im Newsbeitrag news:OpsbIEg0HHA.1184@xxxxxxxxxxxxxxxxxxxxxxx
> Eine Integer-Divison (incl.remainder) braucht (mind. bei etwas älteren CPUs)
> meist einige/etliche Zyklen,


Irrtum vorbehalten, für aktuelle intel Core2 CPUs
http://www.intel.com/products/processor/manuals/

'Optimization Reference Manual'
http://www.intel.com/design/processor/manuals/248966.pdf

gelten wohl grob Angaben wie:

IDIV :
Latency: 22 Throughput 22

AND/OR/XOR :
Latency: 1 Throughput 0.33


Hinzu kommen offenbar in bestimmten Konstellationen (wie im vorliegenden Fall) sogar Optimierungen wie zB:
'Macro fusion'

http://www.intel.com/cd/ids/developer/asmo-na/eng/dc/enterprise/porting/281974.htm?page=3

wo unser optimaler Fall mit 'AND' (=TEST) und Verzweigung 'Then' (=> JE):
test eax,1
je 0000004E
sogar noch in einem (CPU-internen) OP zusammengefasst werden kann!

Binäre Logik ist halt die allereinfachste und 'reinste Form' von 'Mathematik',
sowie massgeschneidert für aktuelle Prozessoren...




--
Thomas Scheidegger - MVP .NET - 'NETMaster'
http://www.cetus-links.org/oo_dotnet.html - http://dnetmaster.net/




.



Relevant Pages

  • Re: [GIT PULL] Ext3 latency fixes
    ... On Sat, 4 Apr 2009, Jens Axboe wrote: ... I'm sorry, but that fsync thing _is_ a real-world case, and it's the one ... should make sure that we don't regress on the throughput side. ... we _have_ regressed on the latency side. ...
    (Linux-Kernel)
  • Re: 2.6.12 Performance problems
    ... > at the cost of decreased throughput - can't ... "Low latency comes at the cost of decreased ... Threading the kernel ...
    (Linux-Kernel)
  • Re: 2.6.12 Performance problems
    ... > at the cost of decreased throughput - can't ... "Low latency comes at the cost of decreased ... Threading the kernel ...
    (Linux-Kernel)
  • [patch] voluntary-preempt-2.6.9-rc1-bk4-Q7
    ... the main change in this patch are more SMP latency fixes. ... kernel, even with CONFIG_PREEMPT enabled, didnt have any spin-nicely ... CPUs in the system. ...
    (Linux-Kernel)
  • Re: Reduce latencies for syncronous writes and high I/O priority requests in deadline IO scheduler
    ... improve throughput, by sending more consecutive requests together. ... The intent is not to boost throughput, but to reduce sync latency. ... With this tiotest run, you only test sequential readers competing, ...
    (Linux-Kernel)