E
eyh5
Hi,
I'm writing some C codes to run simulations.
I'm wondering if there is a website that may contain useful information
on how to make one's code run more efficiently and in a
computational-time-saving manner. Specifically, what I'd like to know
is if there're any useful tips about writing your codes more
efficiently. One such useful tip is that we can use the "switch"
statement instead of multiple "if-else" statements; another is that if
you wish to put some information in an array, and that you foresee the
array is not going to be too big, then it probably pays to just define
a fixed size array instead of using "malloc."
So, I'm wondering if anybody knows of a website that may contain
such helpful tips to help a mid-level programmer like me write codes
better.
Thanks.
-Ed
I'm writing some C codes to run simulations.
I'm wondering if there is a website that may contain useful information
on how to make one's code run more efficiently and in a
computational-time-saving manner. Specifically, what I'd like to know
is if there're any useful tips about writing your codes more
efficiently. One such useful tip is that we can use the "switch"
statement instead of multiple "if-else" statements; another is that if
you wish to put some information in an array, and that you foresee the
array is not going to be too big, then it probably pays to just define
a fixed size array instead of using "malloc."
So, I'm wondering if anybody knows of a website that may contain
such helpful tips to help a mid-level programmer like me write codes
better.
Thanks.
-Ed