On 31.07.2013, at 22:01, Greg Parker gpar...@apple.com wrote:
On Jul 31, 2013, at 12:28 PM, Vincent Habchi vi...@macports.org wrote:
David Duncan wrote:
Why would there be? Your just asking for a mutable copy of an empty string.
It should be equivalent to [[NSMutableString alloc]
Folks,
I apologize if this question looks stupid or contrived. Here it is: is it
permissible to use [@“” mutableCopy] to initialize (or reset) a NSMutableString
instead of the more classical [[NSMutableString alloc] init]?
Thanks a lot!
Vincent
On 31 Jul 2013, at 19:09, Vincent Habchi vi...@macports.org wrote:
Folks,
I apologize if this question looks stupid or contrived. Here it is: is it
permissible to use [@“” mutableCopy] to initialize (or reset) a
NSMutableString instead of the more classical [[NSMutableString alloc]
Le 31 juil. 2013 à 20:15, Mike Abdullah mabdul...@karelia.com a écrit :
I apologize if this question looks stupid or contrived. Here it is: is it
permissible to use [@“” mutableCopy] to initialize (or reset) a
NSMutableString instead of the more classical [[NSMutableString alloc] init]?
On Jul 31, 2013, at 11:25 AM, Vincent Habchi vi...@macports.org wrote:
Le 31 juil. 2013 à 20:15, Mike Abdullah mabdul...@karelia.com a écrit :
I apologize if this question looks stupid or contrived. Here it is: is it
permissible to use [@“” mutableCopy] to initialize (or reset) a
On 31 Jul 2013, at 1:28 PM, David Duncan david.dun...@apple.com wrote:
On Jul 31, 2013, at 11:25 AM, Vincent Habchi vi...@macports.org wrote:
Le 31 juil. 2013 à 20:15, Mike Abdullah mabdul...@karelia.com a écrit :
I apologize if this question looks stupid or contrived. Here it is: is it
On Jul 31, 2013, at 1:45 PM, Fritz Anderson wrote:
On 31 Jul 2013, at 1:28 PM, David Duncan david.dun...@apple.com wrote:
On Jul 31, 2013, at 11:25 AM, Vincent Habchi vi...@macports.org wrote:
Le 31 juil. 2013 à 20:15, Mike Abdullah mabdul...@karelia.com a écrit :
I apologize if this
Thanks to all for answering,
Why would there be? Your just asking for a mutable copy of an empty string.
It should be equivalent to [[NSMutableString alloc] initWithString:@« »]
But much slower I expect, since it creates a NSString, takes a mutable copy,
then implicitly releases the
I think there are some overlooked subtleties as @ is a string literal.
Retain and release are pretty much meaningless to it.
Sandor Szatmari
On Jul 31, 2013, at 15:28, Vincent Habchi vi...@macports.org wrote:
Thanks to all for answering,
Why would there be? Your just asking for a mutable
On 31 Jul 2013, at 2:28 PM, Vincent Habchi vi...@macports.org wrote:
Thanks to all for answering,
Why would there be? Your just asking for a mutable copy of an empty string.
It should be equivalent to [[NSMutableString alloc] initWithString:@« »]
But much slower I expect, since it
On Jul 31, 2013, at 12:28 PM, Vincent Habchi vi...@macports.org wrote:
David Duncan wrote:
Why would there be? Your just asking for a mutable copy of an empty string.
It should be equivalent to [[NSMutableString alloc] initWithString:@« »]
But much slower I expect, since it creates a
On 7/31/2013 1:01 PM, Greg Parker gpar...@apple.com wrote:
Simple alloc/init is the fastest:
100 [[[NSMutableString alloc] init] release]
102 [[NSMutableString new] release]
109 [NSMutableString string] // ARC enabled
117 [[@ mutableCopy] release]
119 @autoreleasepool { [NSMutableString
Greg,
thanks for diverting some of your time testing this. As someone already
commented, the results are somehow consistent with “common sense”, whatever
that means (cf. below).
ARC and non-ARC scores are the same within measurement noise, except for
[NSMutableString string] where ARC can
On Jul 31, 2013, at 1:32 PM, Vincent Habchi vi...@macports.org wrote:
Greg Parker wrote:
ARC and non-ARC scores are the same within measurement noise, except for
[NSMutableString string] where ARC can optimize the autoreleased return
value so the test doesn't need to spin the autorelease
Why not [aMutableString setString:@];?
Sandor Szatmari
On Jul 31, 2013, at 16:32, Vincent Habchi vi...@macports.org wrote:
Greg,
thanks for diverting some of your time testing this. As someone already
commented, the results are somehow consistent with “common sense”, whatever
that means
Le 31 juil. 2013 à 22:38, Greg Parker gpar...@apple.com a écrit :
Not necessarily. If you have long string and you want to clear it and re-fill
it with another long string, then it may be faster to use
-deleteCharactersInRange: in order to avoid memory re-allocation overhead.
But that
On Jul 31, 2013, at 4:01 PM, Greg Parker wrote:
On Jul 31, 2013, at 12:28 PM, Vincent Habchi vi...@macports.org wrote:
David Duncan wrote:
Why would there be? Your just asking for a mutable copy of an empty string.
It should be equivalent to [[NSMutableString alloc] initWithString:@« »]
17 matches
Mail list logo