操作系统  办公  实用知识  设计  开发  WEB开发  移动开发  数据库  软件工程  网管  安全  管理  信息化  答疑  渠道 

Memory Allocation

2006-10-9 网友评论 0 条 点击进入论坛

While 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.

已有 0 位对此文章感兴趣的网友发布了看法    
我来评两句 登录邮箱: 密码:
  匿名发表
今日推荐
技术文库(共有 46473 篇文章)
操作系统
办公软件
实用知识
网络管理
软件开发
WEB开发
软件工程
数据库
设计在线
信息安全
行业信息化
管理信息化
重点推荐
电子杂志订阅
点击电子杂志名称查看样刊
输入E-mail地址即可订阅
E-mail