I am creating a decompiler from IL (Compiled C#\VB code). Is there any way to create reference in C?
Edit:
I want something faster than pointer like stack. Is there a thing like that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Stack and pointer are two completely independent concepts.
A reference is just like a pointer, a way to access/pass a variable without copying it.
On the other hand, stack and heap are two different places where variables live.
The decision whether or not a variable should live on the stack or on the heap is totally independent from the way you pass it around.
If heap allocation is indeed a performance bottleneck, you should make sure that you use automatic variables (on stack) where possible. Then, do profiling of your allocation patterns. And finally optimize your allocation strategy.