CSC258H5 Lecture Notes - Lecture 11: Journal Of Forestry

14 views2 pages
14 Oct 2020
School
Course
Professor

Document Summary

Note: if we have multiple levels of function calls, the return address should be stored on the stack, so you don"t overwrite the value of the first function call. So before making a function call, you have to store all temporary values and return values on to the stack before calling the function. This way, you will not lose those values. When you return from a function call, pop the values from the stack. Notice that this increases the time cost. Inline functions are faster because the then you do not need to do jumps or stack manipulations. This code avoids the if branching statement so you can avoid jumping and branching. Modern processesor tries to load the next instruction, which gives a speed boost, but if you branch to a different line, then the speed boast is waster.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents