iphone - which option gives me better performance: a variable declaration or an implicit function in iOS -
not less code better, last lesson learned
so came me question
in terms of memory management, speed , that, what's better??
uialertview *message = [[uialertview alloc]initwithtitle:@"notification" message:@"my message" delegate:self cancelbuttontitle:@"ok" otherbuttontitles:@"cancelar",nil]; [message show];
or
[[[uialertview alloc]initwithtitle:@"notification" message:@"my message" delegate:self cancelbuttontitle:@"ok" otherbuttontitles:@"cancelar",nil]show];
this short difference (2 lines against one) can more complex when you're reducing more code more complex code , functions
thanks in advance answer
there no perceivable change in speed and, both perform same action, there no saving on memory.
to give analogy, takes less thinking, reading "it's boy!" or "it boy!"?
you take same amount of time process information, regardless of spelling differentiation between two, , time nothing.
to answer question (or think question). there no difference in memory savings between two, , not save processing time.
it better make code easier read. trying read smashed code waste more time trying process such minute difference, in example.
Comments
Post a Comment