Skip to content

Performance about SilkTouch #448

Answered by HurricanKai
BobbyBao asked this question in Q&A
Discussion options

You must be logged in to vote

you are inspecting IL here - while our bindings aren't the most IL space efficient, the JIT is very good at turning these into assembly, and they are chosen to allow JIT to optimize.
You are referencing the seemingly uncessary cast to Silk.NET.Vulkan.Vk.GeneratedVTable, but this is done to allow the JIT to assume the type and devirtualize the call, allowing inlining of the call
in asm, a typical function will look something like

G_M60490_IG05:
   mov      rax, qword ptr [rsi+16]
   mov      rcx, rax
   test     rcx, rcx
   je       SHORT G_M60490_IG07
G_M60490_IG06:
   jmp      SHORT G_M60490_IG08
G_M60490_IG07:
   mov      rcx, gword ptr [rsi+8]
   mov      rdx, 0xD1FFAB1E
   mov      rd…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Perksey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #446 on April 04, 2021 16:00.