6

Is it more computationally expensive to call another contract's function than calling that function internally? If so, is it appreciably more expensive or is it fairly negligible?

7

Yes it will cost more gas. By calling a function from another contract, you will need to use the CALL opcode. If you are calling a function within the same contract, it will simply do a JUMP. CALLs are a few hundred gas more expensive.

Edit for additional information: To be specific with gas amounts, CALLs are ~700 gas, whereas JUMPs are 1 gas.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.