Simple benchmarks for testing the speed of JavaScript matrix libraries adapted from Brandon Jones benchmarks
in his glmatrix library: https://glmatrix.googlecode.com/hg/
If you have a browser with WebGL you can run the benchmarks [here](http://stepheneb.github.com/webgl-matrix-benchmarks/matrix_benchmark.html).
This work is based on Brandon's work as of this commit:
e5ad8f6975eef038de668914a44ed36e2c611966
Date: October 10, 2010 12:49:00 PM EDT
Upped version to 0.9.5
Comparing these matrix libraries:
* [glMatrix](http://code.google.com/p/glmatrix), [zlib license](http://www.opensource.org/licenses/Zlib)
* [mjs](http://code.google.com/p/webgl-mjs), [MIT license](http://www.opensource.org/licenses/mit-license.php)
* CanvasMatrix
* [EWGL_math](http://code.google.com/p/ewgl-matrices), [New BSD license](http://www.opensource.org/licenses/bsd-license.php)
* [tdl](http://code.google.com/p/threedlibrary/), [New BSD license](http://www.opensource.org/licenses/bsd-license.php)
* [Closure](http://closure-library.googlecode.com/), [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0)
* [Sylvester](http://sylvester.jcoglan.com/), [MIT license](http://www.opensource.org/licenses/mit-license.php)
Changes from Brandon's original benchmark code include:
* Only including the benchmark code from glmatrix.
* Updated to the latest mjs as of Dec 15: 16:8e5b0944ef1e and included it in several more tests.
* Added a graph display of the results using flotr, see: http://solutoire.com/flotr/
* Added tdl library (thanks to Gregg Tavares)
* each library runs in an iframe so the code won't affect the other libraries (thanks to Gregg Tavares)
* Added Sylvester library (thanks to [Felix E. Klee](mailto:felix.klee@inka.de))
Brandon's original code was released under the [New BSD license](http://www.opensource.org/licenses/bsd-license.php).
My additions to the benchmarking code are released under the same license.
## Running locally requires a web server.
With the recent changes by Gregg Tavares that run each library in an iFrame you will need to either:
* Run the benchmarks from a local web server
* Configure the browser to allow local file access
### Configuring Chrome to allow local file access
On Windows you can add a flag in the shortcut.
On Mac OS X start Chrome from the command line like this:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --allow-file-access-from-files
### Using Python's SimpleHTTPServer
cd /path/to/webgl-matrix-benchmarks
python -m SimpleHTTPServer
Now open: <http://localhost:8000/matrix_benchmark.html>
### Set up an webgl-matrix-benchmarks.local local host and Apache vhost on Mac OS X
On OS X, turn on Web Sharing via (Apple Menu) -> System Preferences -> Sharing -> Web Sharing
Now, make sure that virtual hosting is enabled by editing `/private/etc/apache2/httpd.conf` and uncommenting the
virtual hosting line (at about line 465 of the stock `httpd.conf`) as follows:
# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf
At the top of httpd-vhosts.conf enable name-based virtual hosts for port 80 on all interfaces:
NameVirtualHost *:80
Edit the virtual hosting configuration file `/private/etc/apache2/extra/httpd-vhosts.conf` to include the entry:
<VirtualHost webgl-matrix-benchmarks.local:80>
ServerName webgl-matrix-benchmarks
DocumentRoot /path/to/webgl-matrix-benchmarks
PassengerEnabled off
<Directory /path/to/webgl-matrix-benchmarks >
Options +Indexes +FollowSymLinks +MultiViews +Includes
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex matrix_benchmark.html
</Directory>
</VirtualHost>
after making changes test the config: `apachectl configtest`
When the configuration syntax is correct restart apache: `sudo apachectl restart`
If there are issues try tailing the general apache2 error log: `tail -n 200 -f /var/log/apache2/error_log`
For more instructions, set <http://shapeshed.com/journal/setting_up_local_websites_on_snow_leopard/>.
And, finally, edit your `/etc/hosts` file to include the following line:
127.0.0.1 webgl-matrix-benchmarks.local
Confirm that the new entry works:
$ dscacheutil -q host -a name webgl-matrix-benchmarks.local
name: webgl-matrix-benchmarks.local
ip_address: 127.0.0.1
It might be necessary to flush the local DNS cache:
$ sudo dscacheutil -flushcache
Now open: <http://webgl-matrix-benchmarks.local/>
没有合适的资源?快使用搜索试试~ 我知道了~
改编自BrandonJones基准测试httpsglmatrix.googlecode.comhg.zip
共51个文件
js:35个
html:9个
css:2个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 73 浏览量
2023-04-13
23:45:57
上传
评论
收藏 278KB ZIP 举报
温馨提示
改编自BrandonJones基准测试httpsglmatrix.googlecode.comhg.zip
资源推荐
资源详情
资源评论
收起资源包目录
改编自BrandonJones基准测试httpsglmatrix.googlecode.comhg.zip (51个子文件)
webgl-matrix-benchmarks-master
table
fastinit.js 2KB
tablesort.js 14KB
table.css 1KB
sprintf.js 8KB
js
rand.js 722B
test-helper.js 3KB
readme.md 4KB
libs
Sylvester
benchmark.js 6KB
Sylvester.html 527B
sylvester.js 13KB
mjs
mjs.html 6KB
mjs.js 48KB
glMatrix
glMatrix.html 5KB
gl-matrix.js 49KB
CanvasMatrix
CanvasMatrix.js 22KB
CanvasMatrix.html 5KB
tdl
tdl-math.html 6KB
tdl
fast.js 46KB
string.js 4KB
math.js 73KB
base.js 16KB
log.js 3KB
tdl-fast.html 5KB
closure
goog
vec
vec.js 1KB
mat4.js 46KB
vec3.js 9KB
mat3.js 22KB
ray.js 3KB
quaternion.js 10KB
matrix4.js 44KB
float32array.js 4KB
matrix3.js 21KB
vec4.js 9KB
deps.js 196KB
base.js 48KB
closure.html 6KB
EWGL_math
EWGL_math.js 21KB
EWGL_math.html 5KB
flotr
lib
canvastext.js 22KB
excanvas.js 41KB
base64.js 3KB
canvas2image.js 6KB
prototype.js 127KB
flotr-min.js 79KB
flotr.css 1KB
flotr.js 162KB
images
tablesort
up.gif 56B
down.gif 57B
destroy.png 555B
blank.cur 78B
matrix_benchmark.html 16KB
共 51 条
- 1
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Matlab与 Fortran的混合编程及其应用
- dafsbkljkfafsfsf
- 用Swift Palyground学习编程(初级)
- labview简易计算器,类似于windows自带的计算器 浙理工同学可以无脑下载
- Java编程思想笔记(全)
- 基于Selenium的Java爬虫实战(内含谷歌浏览器Chrom和Chromedriver版本121.0.6154.0)
- 基于Selenium的Java爬虫实战(内含谷歌浏览器Chrom和Chromedriver版本121.0.6150.0)
- 基于Python+opencv的多人脸检测,口罩佩戴检测,单目标跟踪
- 基于Selenium的Java爬虫实战(内含谷歌浏览器Chrom和Chromedriver版本121.0.6148.0)
- 基于C++版本的sort算法,可无缝添加在检测器后进行实时多目标跟踪
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功