为什么Meteor.js使用它自己的ID算法?
为什么不使用MongoDB的ObjectId()?
在某处- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {:
static NSString *CellIdentifier = @"TagCell";
TagCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier
forIndexPath:indexPath];
Run Code Online (Sandbox Code Playgroud)
VS
NSString *CellIdentifier = NSStringFromClass([TagCell class]);
TagCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier
forIndexPath:indexPath];
Run Code Online (Sandbox Code Playgroud)
我认为第一个例子对于性能更好,但第二个更好用于重构.
我总是使用第二种方式.
这些代码示例之间的性能差异很大?