High performance Javascript reading notes 2 – Data Access

原创 2010年05月31日 23:04:00

• Literal values and local variables can be accessed very quickly, whereas array items and object members take longer.

• Local variables are faster to access than out-of-scope variables because they exist in the first variable object of the scope chain. The further into the scope chain a variable is, the longer it takes to access. Global variables are always the slowest to access because they are always last in the scope chain.

• Avoid the with statement because it augments the execution context scope chain. Also, be careful with the catch clause of a try-catch statement because it has the same effect.

• Nested object members incur significant performance impact and should be minimized.

• The deeper into the prototype chain that a property or method exists, the slower it is to access.

• Generally speaking, you can improve the performance of JavaScript code by storing frequently used object members, array items, and out-of-scope variables in local variables. You can then access the local variables faster than the originals.

High performance Javascript reading notes 1 - Load JavaScript

•Put all tags at the bottom of the page, just inside of the closing tag. This ensures that the page...
  • Danwang
  • Danwang
  • 2010年05月20日 22:39
  • 511

High Performance Python 笔记(Python是门不错的语言,全栈程序员就用它好了!)

High Performance Python 目录 1 Understanding Performant Python2 Profiling3 Lists and Tuples4 Di...
  • cteng
  • cteng
  • 2014年10月07日 22:48
  • 2168


High Performance Spark Chatper 2 How Spark Works spark是依托于分布式存储系统集群管理器之上的分布式通用计算框架 Spar...
  • hjw199089
  • hjw199089
  • 2017年09月15日 00:37
  • 204

Install the high performance Nginx web server on Ubuntu

Look out Apache, there’s a web server – Nginx (pronounced Engine X) – that means to dismantle you as...
  • Rongbo_J
  • Rongbo_J
  • 2015年06月04日 22:18
  • 575

高性能浏览器网络(High Performance Browser Networking) 第一章

  • xingtian713
  • xingtian713
  • 2013年09月21日 22:44
  • 8993

<<High Performance JavaScript>>读书笔记-2.Data Access

Scope Chains and Identifier Resolution function add(num1, num2){ var sum = num1 + num2; ret...
  • louieuser
  • louieuser
  • 2012年08月09日 11:05
  • 347

mpg123 /root/We\ belong\ to\ the\ sea.mp3

tinymix "Speaker Playback Volume" 100 tinymix "Left Output Mixer PCM Playback Switch" 1 tinymix "R...
  • zhang6318
  • zhang6318
  • 2017年03月17日 15:06
  • 141

Failed to start A high performance web server and a reverse proxy server 错误提示

点击打开链接 I am running nginx on Raspbian Jessie operating system. I just created new virtual ...
  • qq_14989227
  • qq_14989227
  • 2017年10月20日 15:23
  • 2501

nginx 安装失败 没有/etc/nginx目录

Failed to start A high performance web server and a reverse proxy server sudo apt-get --purge auto...
  • xp5xp6
  • xp5xp6
  • 2017年01月18日 16:07
  • 3686

深度学习论文理解3:Flexible, high performance convolutional neural networks for image classification

本文是11年Dan C.Ciresan的作品,主要贡献是提供了一种快速,全GPU部署的CNN计算框架,通过快速的GPU计算可以让作者尝试相对以前的神经网络更深的CNN,而且是仅仅使用监督学习的方式。 ...
  • whiteinblue
  • whiteinblue
  • 2015年01月26日 10:30
  • 2324
您举报文章:High performance Javascript reading notes 2 – Data Access