jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/platform/CCClass.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/cocoa/CCGeometry.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/platform/Sys.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/platform/CCConfig.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/platform/miniFramework.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/platform/CCCommon.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/platform/ZipUtils.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/platform/CCMacro.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/platform/CCFileUtils.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/platform/CCTypes.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/platform/CCAccelerometer.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/platform/CCEGLView.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/cocoa/CCSet.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/cocoa/CCNS.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/cocoa/CCAffineTransform.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/support/CCPointExtension.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/support/TransformUtils.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/base_nodes/CCNode.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/textures/CCTexture2D.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/textures/CCTextureCache.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/textures/CCTextureAtlas.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/misc_nodes/CCRenderTexture.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/misc_nodes/CCProgressTimer.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/actions/CCAction.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/actions/CCActionInterval.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/actions/CCActionInstant.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/actions/CCActionManager.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/actions/CCActionProgressTimer.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/actions/CCActionEase.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/layers_scenes_transitions_nodes/CCScene.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/layers_scenes_transitions_nodes/CCLayer.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/layers_scenes_transitions_nodes/CCTransition.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/sprite_nodes/CCSprite.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/sprite_nodes/CCAnimation.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/sprite_nodes/CCAnimationCache.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/sprite_nodes/CCSpriteFrame.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/sprite_nodes/CCSpriteFrameCache.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/sprite_nodes/CCSpriteBatchNode.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/label_nodes/CCLabelTTF.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/label_nodes/CCLabelBMFont.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/touch_dispatcher/CCTouchDelegateProtocol.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/touch_dispatcher/CCTouchHandler.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/touch_dispatcher/CCTouchDispatcher.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/touch_dispatcher/CCMouseDispatcher.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/keyboard_dispatcher/CCKeyboardDelegate.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/keyboard_dispatcher/CCKeyboardDispatcher.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/text_input_node/CCIMEDispatcher.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/text_input_node/CCTextFieldTTF.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/CCConfiguration.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/CCDirector.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/CCScheduler.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/../Game/src/core/MooLoader.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/CCDrawingPrimitives.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/platform/CCApplication.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/platform/CCSAXParser.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/platform/AppControl.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/menu_nodes/CCMenuItem.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/menu_nodes/CCMenu.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/cocos2d/base_nodes/CCdomNode.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/CocosDenshion/SimpleAudioEngine.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/GUI/CCControlExtension/CCControl.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/GUI/CCControlExtension/CCControlButton2.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/GUI/CCControlExtension/CCInvocation.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/GUI/CCControlExtension/CCScale9Sprite.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/GUI/CCScrollView/CCScrollView.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/GUI/CCScrollView/CCSorting.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/GUI/CCScrollView/CCTableView.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCBReader/CCNodeLoader.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCBReader/CCBReaderUtil.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCBReader/CCControlLoader.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCBReader/CCSpriteLoader.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCBReader/CCNodeLoaderLibrary.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCBReader/CCBReader.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCBReader/CCBValue.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCBReader/CCBKeyframe.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCBReader/CCBSequence.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCBReader/CCBRelativePositioning.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCBReader/CCBAnimationManager.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCEditBox.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCArmature/utils/CCArmatureDefine.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCArmature/utils/CCDataReaderHelper.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCArmature/utils/CCSpriteFrameCacheHelper.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCArmature/utils/CCTransformHelp.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCArmature/utils/CCTweenFunction.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCArmature/utils/CCUtilMath.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCArmature/utils/CSArmatureDataManager.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCArmature/datas/CCDatas.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCArmature/display/CCDecorativeDisplay.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCArmature/display/CCDisplayFactory.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCArmature/display/CCDisplayManager.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCArmature/display/CCShaderNode.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCArmature/display/CCSkin.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCArmature/animation/CCProcessBase.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCArmature/animation/CCArmatureAnimation.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCArmature/animation/CCTween.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCArmature/CCArmature.js"></script>
<script src="http://html5.sanguo.ismole.com/HTML5/extensions/CCArmature/CCBone.js"></script>
cc = cc || {};
cc.canvas = document.createElement("canvas");
cc.Sprite1 = cc.NodeRGBA1.extend({
_ctorForCanvas: function (fileName) {
cc.NodeRGBA1.prototype.ctor.call(this);
this._shouldBeHidden = false;
this._offsetPosition = cc.p(0, 0);
this._unflippedOffsetPositionFromCenter = cc.p(0, 0);
this._blendFunc = {src: cc.BLEND_SRC, dst: cc.BLEND_DST};
this._rect = cc.rect(0, 0, 0, 0);
this._newTextureWhenChangeColor = false;
this._textureLoaded = true;
this._loadedEventListeners = [];
this._textureRect_Canvas = cc.rect(0, 0, 0, 0);
this._drawSize_Canvas = cc.size(0, 0);
if (fileName) {
if (typeof(fileName) === "string") {
var frame = cc.SpriteFrameCache.getInstance().getSpriteFrame(fileName);
this.initWithSpriteFrame(frame);
} else if (typeof(fileName) === "object") {
if (fileName instanceof cc.SpriteFrame) {
this.initWithSpriteFrame(fileName);
} else if ((fileName instanceof HTMLImageElement) || (fileName instanceof HTMLCanvasElement)) {
var texture2d = new cc.Texture2D();
texture2d.initWithElement(fileName);
texture2d.handleLoadedTexture();
this.initWithTexture(texture2d);
} else if (fileName instanceof cc.Texture2D) {
this.initWithTexture(fileName);
}
}
}
},
})
cc.Sprite1.create = function (fileName, rect) {
var argnum = arguments.length;
var sprite = new cc.Sprite1();
if (argnum === 0) {
if (sprite.init())
return sprite;
} else {
/** Creates an sprite with an image filename.
If the rect equal undefined, the rect used will be the size of the image.
The offset will be (0,0).
*/
if (sprite && sprite.init(fileName, rect))
return sprite;
}
return null;
};
Ready to run.
Test | Ops/sec | |
---|---|---|
test1 |
| ready |
test2 |
| ready |
test3 |
| ready |
test4 |
| ready |
test5 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.