Browse Source
Setting the array elements to -1 is more expensive than relying on the allocator to zero the array for us first. Shifting the code to always add 1 to the size (so an empty file is actually 1 byte long) allows us to detect an unloaded size by comparing to 0, thus saving the array fill calls. Change-Id: Iad859e910655675b53ba70de8e6fceaef7cfcdd1 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>stable-0.10
Shawn O. Pearce
14 years ago
1 changed files with 4 additions and 9 deletions
Loading…
Reference in new issue