前面两篇文章分别介绍了WebWorkers和Typed Array,下面我们来介绍一下另一个针对性能的JS API:ParallelArray。
html5
HTML5响应式设计CSS模板Codrops
Codrops 是一个基于CSS3 实现的全屏网页过渡特效的设计模板。页面初始布局是四个盒子,点击其中一个会动态扩张到全屏,而其它的会淡出隐藏。
当关闭当前页面时,则返回原先的页面,模板在各个分辨率下都可以获得不错的效果。
HTML5: discovering the difference in size
We all heard about responsive web design. The idea behind it is simple: The layout of your page adapts to the screen size. That is, on a large screen you might want to show your content with a navigation bar to the left and some advertisement to the right. When the screen and or browser window is smaller, maybe you just show the content and move the navigation bar to the top. Something like that.
My Experience at Earlham College Hackathon 2013
My name is Jean Paul Mugizi. I am a junior at Miami University of Ohio majoring in Software Engineering. Attending the Intel Hackathon 2013 has been a unique experience for me as I chance to network with students from Erlham College, Indiana University, and Miami University working together to write a data visualization board for climate trends.
HTML5标准与性能之二:Typed Array
在上一篇“HTML5标准与性能之一:WebWorkers”中,我们了解了Web Workers为计算密集型的Web应用带来的优势。那这篇文章就为大家介绍另一个有助于性能提升的HTML5标准——Typed Array。
Typed Array
在JS语言中,数值只有一种称为Number的类型,而不像C语言或底层CPU指令那样区分是整型还是浮点型,是有符号的还是无符号的,是32位的还是64位的,因此如果用JS来实现32位整型的除法计算(结果仍是32位整型),就需要利用标准库函数Math.floor (x / y)来模拟实现,可想而知性能会大打折扣。另外,JS不具备二进制格式数据的解析能力,必须利用一些非常规手段来实现,首先要把二进制数据作为文本读入(通过AJAX等),然后用String.prototype.charCodeAt(i)来依次读取每个字节的数据,如果进一步需要解析各种不同类型的数据则难上加难。
HTML5标准与性能之一:WebWorkers
使用HTML5开发的应用越来越多,很多针对性能提升的新标准也开始逐渐提出,提交到HTML5、EcmaScript等标准中,给HTML5的应用更强大的计算能力。我们分4篇文章分别介绍一下这些针对HTML5性能的新标准:Web Workers, Typed Array, ParallelArray 和 asm.js。
之一:Web Workers
Web Workers是一个在前端实现多线程的JS接口,属于W3C的HTML5标准的一部分,现在大多数浏览器包括移动浏览器都支持Web Workers.

