aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/sched-migration.py
diff options
context:
space:
mode:
authorJesse Gross <[email protected]>2011-05-26 16:25:02 -0700
committerLinus Torvalds <[email protected]>2011-05-26 17:12:33 -0700
commit704f15ddb5fc2a7f25a12eb0913302d8ad9ffab3 (patch)
treeef17a945288c333c345643325783f374e10a4020 /tools/perf/scripts/python/sched-migration.py
parent5bf54a9758c230d9e957e7b4f3a41c226660dd49 (diff)
flex_array: avoid divisions when accessing elements
On most architectures division is an expensive operation and accessing an element currently requires four of them. This performance penalty effectively precludes flex arrays from being used on any kind of fast path. However, two of these divisions can be handled at creation time and the others can be replaced by a reciprocal divide, completely avoiding real divisions on access. [[email protected]: rebase on top of changes to support 0 len elements] [[email protected]: initialize part_nr when array fits entirely in base] Signed-off-by: Jesse Gross <[email protected]> Signed-off-by: Eric Paris <[email protected]> Cc: Dave Hansen <[email protected]> Cc: David Rientjes <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/sched-migration.py')
0 files changed, 0 insertions, 0 deletions