Tag Archives: efficient
Achieving optimal performance in code
Is there any difference between the following two expressions\statements? def func1(a): return a == ‘TRUE’ def func2(a): return True if a == ‘TRUE’ else False Well, both of them do the same thing but interestingly, the former one is faster in terms of performance by atleast one CPU cycle! Let’s tear into assembly language of […]
0
Login