| 操作系统 办公 实用知识 设计 开发 WEB开发 移动开发 数据库 软件工程 网管 安全 管理 信息化 答疑 渠道 |
Memory AllocationWhile efficient coding is too broad a topic to be covered here, there are some general suggestions which may be helpful. It is very important to not use a busy loop nor poll for data. Always use event-driven techniques. Because data services has a lower priority than BREW™ applications (which run at UI priority), polling for data blocks the data from being transmitted. Pay attention to any activity which is done in a loop. Savings there are multiplied by the loop count. Consider allocating an INT to hold the length of a character string, instead of making repeated calls to STRLEN(). Algorithmic improvements generally offer much better returns than tweaking individual lines. For example, using a better search or sort technique usually makes a bigger difference than optimizing an existing one.
今日推荐
|
重点推荐
领军企业技术文库
+更多领军技术文库
最新专题
电子杂志订阅
| ||||||||