Re: Need something like macro

2015-03-09 Thread Kent Fredric
On 10 March 2015 at 00:56, Артём Варнайский wrote: > > I used a nytprof to check performance, function call reduces it. Its not just "reduces it" that matters. Its whether reducing it in the grand scale of things is really important. ( vs other parts of the system / general usecases ) If for i

Re: Need something like macro

2015-03-09 Thread Артём Варнайский
Kent wrote: >Important question: > >How did you prove this was a performance issue. > >Because unless you've > >a) profiled your code >b) benchmarked your code >c) seen that the performance is significantly impeded by that function call >d) seen that the performance is in the function overhead its

Re: Need something like macro

2015-03-08 Thread Shlomi Fish
Hi Artem, Please reply to all recipients. On Sun, 08 Mar 2015 17:11:52 +0300 Артём Варнайский wrote: > Hello, folks! > I have such line: > int rand(2)?1:-1 > It repeats in source code 5 times and executes over 800 times, due to > performance issues, I don't want to wrap it with subroutine. How

Re: Need something like macro

2015-03-08 Thread Kent Fredric
On 9 March 2015 at 03:11, Артём Варнайский wrote: > due to performance issues Important question: How did you prove this was a performance issue. Because unless you've a) profiled your code b) benchmarked your code c) seen that the performance is significantly impeded by that function call