Displaying 3 results from an estimated 3 matches for "__jumpmap_find".
2017 Feb 13
5
(RFC) JumpMaps: switch statement optimization
...ltBB}
}
Without Jump Maps:
if(x==0x6851) {
goto BB1
}
else if(x==0x1383) {
goto BB2
}
else if(x==0x2224){
goto BB3
}
else{
goto defaultBB
}
With Jump Maps:
jumpmap_0 = {
keys = {3, 0x6851, 0x1383, 0x2224}
vals = {defaultBB, BB1, BB2, BB3}
}
addr dst = __jumpmap_find(&jumpmap_0, x)
goto dst;
On our target Jump Maps produce both smaller and faster code even for
quite small switch statements. We believe other architectures would
benefit as well, X86 and ARM included:
- jumpmap struct has a good chance of being cached more efficiently than
a large chunk of...
2017 Feb 14
2
(RFC) JumpMaps: switch statement optimization
...=0x1383) {
> goto BB2
> }
> else if(x==0x2224){
> goto BB3
> }
> else{
> goto defaultBB
> }
>
> With Jump Maps:
> jumpmap_0 = {
> keys = {3, 0x6851, 0x1383, 0x2224}
> vals = {defaultBB, BB1, BB2, BB3}
> }
> addr dst = __jumpmap_find(&jumpmap_0, x)
> goto dst;
>
> On our target Jump Maps produce both smaller and faster code even for quite small switch statements. We believe other architectures would benefit as well, X86 and ARM included:
> - jumpmap struct has a good chance of being cached more efficiently th...
2017 Feb 14
3
(RFC) JumpMaps: switch statement optimization
...>> }
>>> else{
>>> goto defaultBB
>>> }
>>>
>>> With Jump Maps:
>>> jumpmap_0 = {
>>> keys = {3, 0x6851, 0x1383, 0x2224}
>>> vals = {defaultBB, BB1, BB2, BB3}
>>> }
>>> addr dst = __jumpmap_find(&jumpmap_0, x)
>>> goto dst;
>>>
>>> On our target Jump Maps produce both smaller and faster code even for quite small switch statements. We believe other architectures would benefit as well, X86 and ARM included:
>>> - jumpmap struct has a good chance of b...