精選文章

SmallBurger Asset Home

  SmallBurger

2011年9月15日 星期四

關於Script的評比…

這篇是關於Scirpt的評比,發現原來Lua的效能比Perl及Python好,之前都搞不清楚狀況,看魔獸用Lua就跟著用,現在才發現自己用對了(個人對Script來說比較重視效能),文章出處是Unigine引擎的Development log,截錄內容如下:
Huge speed-up of UnigineScript

The recent update of Unigine engine  brought a significant speed-up of UnigineScript (the built-in scripting system). Here is the performance comparison chart of UnigineScript 2.46, Lua 5.1.4, Perl 5.10.1 and Python 2.6.6 (higher values stand for higher performance):















All tests were performed on Intel Core2 Duo E6750 @ 2.66 GHz / Ubuntu Linux 10.10 (64-bit).
The following tests were made:

  • Array - simple math operations and array elements access
  • Branching - conditional branching
  • Loop - a loop with variable increment inside
  • Loops - six nested loops with 16 iterations per each loop, variable increment inside
  • Matrix - 128x128 matrices multiplication
  • Random - simple random number generator, a loop with a function call running 20,000,000 iterations
  • Sort - quick sort and buble sort algorithms (no external C functions, only pure bytecode)
  • Statistics - simple Gaussian random number generator and Gaussian distribution calculation
  • Vectors - simple math operations with 3D vectors and 4x4 matrices
According to these tests, UnigineScript has proven to be the fastest scripting language, especially optimized for 3D-specific tasks with its built-in support of 3D math.

文章出處:http://unigine.com/devlog/

2 則留言: