rem - 1 year ago 89

R Question

What is the computational cost of arithmetic operations in R? E.g. does multiplication of two 32-bit integers take constant time with regard to their magnitude?

Recommended for you: Get network issues from **WhatsUp Gold**. **Not end users.**

Answer Source

If you look here you'll see that in R, integer multiplication simply calls the C integer-multiplication operator. So the only answer I can give to "what is the computational cost of integer multiplication in R?" is "the same as the computational cost of integer multiplication with whatever C compiler has been used to compile R"; the answer to *that* question will usually be "the same as the computational cost of the integer-multiplication machine instruction (e.g., `IMUL`

) on the particular chip on which you are running".

Recommended from our users: **Dynamic Network Monitoring from WhatsUp Gold from IPSwitch**. ** Free Download**