GC is shit. You should be ashamed of yourself for not writing this in C.
Name:
FrozenVoid2011-10-29 5:18
>>9
There is no point, C can do it realtime, but you can't embed C in a webpage.
Name:
Anonymous2011-10-29 5:21
>>10
You want to embed this cpu-intensive-as-shit (even once it renders) thing into a webpage? What's wrong with you?
If you want this animation on a website, put up an APNG or GIF animated image.
Name:
FrozenVoid2011-10-29 5:24
>>11
That not for consumers, its a demoscene-like show-off to see how fast you can get with javascript.
Name:
Anonymous2011-10-29 5:51
>>12
In that case, it's not all that special. JS can do basic math and draw images, everyone knows that.
>>14
So you didn't even write it all by yourself, you just improved the performance of another's work.
Name:
FrozenVoid2011-10-29 6:26
>>15
Thats the whole point, you take Code A and improve it to reach much faster speed.
The fastest program is considered the best(as long as it render correct quasicrystal output).
You're welcome to take >>5 and write a faster version yourself, so you see how hard it is.
For example
Code A is optimized to Code B
if B time < A time , A is replaced by B
next version must be faster than new A
Each new optimization level is harder to get, and clever programming tricks come to background.
In javascript there is easy, though artificially limited environment where you can test-debug-compare thousand of scripts per day by simply realoding one .htm file in the browser(which can be sent to anyone and displayed/installed in seconds).
Name:
Anonymous2011-10-29 6:49
>>16
Sure: http://pastebin.com/gnHTKVj6
This version is 3 seconds faster (12 to 12.3, before it was 15.2 to 15.5), yet I won't pretend I made something so great others should adore me and my work.
I'm currently working on precomputed version. >>19 wasn't fast enough on my machine(even 600ms slower, athlon II x2 240 (it doesn't like branching apparently))
This algorithm is extremely simple and there could be further optimizations, but i can't find any yet(except precomputing alot of values)
Name:
Anonymous2011-10-29 11:44
>>21
Strange, especially considering how slow JavaScript functions are.
On my Intel i5 CPU, my version was 3 seconds faster. Optimization is often architecture-specific.
Also, I have never written anything more complex than a Hello World in JavaScript.
I'll rewrite Math.cos/sin calls to my version later, this is just a demo
Name:
FrozenVoid2011-10-29 13:01
Current breakdown for optimizations:
2348 ms cost storing.data[i++]
3777 ms inner loop
1420 ms precomputation/rest
compared:51580ms(Jasons)/8228ms(Current)=x6.26 speed
>>41
removing the rendering before cache: its pretty simple actually, the canvas calls in the middle of render(write->read->write)
stall the outer function(which won't happen after they are cached, since render is now complete(which just takes 3 seconds since ite now write->write->read)).
>>52
this is near-realtime video generation of full-screen quasicrystals in a browser.
It takes 15 seconds for a compiled -O2 haskell program running on six-core monster render a single crappy image of monochrome quasicrystal
my script would at 2.5 seconds completely load the entire 30-frame frameset of full screen, full color quasicrystals(and my version has better colors, since it fades/recycles colors with cool effect, rather then using a static multiply into an index).
I'm curious as to why the lookup computations were considered slower. I've tried optimizing js animation code in the past with inconsistent results, especially when trying to move mults out of loops.
Lookup tables are justified when the: cost of OP > cost of lookup+storage
A lookup table for plain x*y multiply is likely to be useless(with exception of innermost loops), but lookup for x*y*z-v*y*x would reduce computational load significantly.
Division is usually replaced by muls to inverse, and inverse tables/consts can be created for common vars,much more useful in practice.
I dislike lookup tables personally, it is inelegant solution to algorithmic load,unlike simplifying higher level formula describing the algorithm.
Nevertheless, expert usage and testing can make lookup tables effective, especially when the table is generated dynamically in response to data(as in Acid code) simplifying the code into a chain of lookup tables. >>63
I can hardcode most of the stuff, but this will cost with flexibility:
no zoom factor changes for example, no custom sin/cos table seeds,etc.
>>69
Nothing. Constants don't slow down the code much and don't speed it up.
I was searching for optimizations for every variable and its effect in the inner loop.
>>71 how about coding things so they work in chrome
Bad idea. Things that run well in chrome run poorly elsewhere. Just make your own version that only works in chrome.
Name:
FrozenVoid2011-11-01 4:19
http://pastebin.com/LmKpfZqb
Version which run at 10fps, without cache:1024frames without any memory cost
It is 2 times slower, but only use 30mb of ram vs nearly 1.2GB for fast version(30 frames*40mb). >>71
The canvas is not stretched: it aligned to avoid clipping
If i used fullsize canvas it would clip(will have scroll bars and obscured parts) and will not have optimized aligned%8 loop
Name:
FrozenVoid2011-11-01 4:30
>>71
Array.map(function(e) func(e)) and Array.map(function(e){/
* code*
/})is a very common modern javascript idiom.
If google does not want to support it, its their lose.
You can rewrite it as loop with ~0.5ms faster execution time if you like.
Name:
FrozenVoid2011-11-01 4:36
.map/Math.cos will be replaced by faster code later, i'm more concerned with overall design now.
http://pastebin.com/HKgRXBX2
Acid 5.9 :1952 ms per 30 frames
Cached version:
- setTimeout replaced by loop, pre-computation loops merged(not optimized yet)
- frame display is now in separate function
- precomputation loops merged(not completely optimized, just merged)
defining a function without braces is not a common javascript idiom.
Name:
FrozenVoid2011-11-01 8:43
>>79
Its called short function syntax, used like
if(x)code;
but now with functions
function a(v) v*2
(return is ommited since the last expression is returned)
>>83
Inside the first loop, isn't it faster to do
for(i=0;i<frcount;i++){//replaces CreateImageData
cache[i]={width:w, height:h, ... };
wint[i]=Uint32Array(cache[i].data.buffer);
}
?
>You want to embed this cpu-intensive-as-shit (even once it renders) thing into a webpage? What's wrong with you?
>If you want this animation on a website, put up an APNG or GIF animated image.
Actually, you have to use intensive JS shit to display APNG in half of the browsers: https://github.com/davidmz/apng-canvas
>>111
When webGL becomes a stable api(note "experimental-webgl" part) supported by all browsers, i'll consider it.
Last time i tried to runs WebGL half the shaders didn't run, another displayed white blobs randomly on my screen and FF used up all my memory
>>131
i don't have to fight my OS everyday to use it. I don't have to resolve dependencies, hunt correct drivers or recompile kernels.
I just expect the system to be stable and behave as expected. I'm not a fan of MS but XP is excellent OS for casual use.
No Lunix distro does ever come close.
Name:
Anonymous2011-11-03 1:52
>>133
At the end of the day, you're still some FrozenVoid.
>>150
Awesome code. Great size. Looks concise. Efficient. Elegant. Keep us all posted on your continued progress with any new code factoring or compiler optimization. Show us what you got man. Wanna see how freakin' expressive, efficient, concise and elegant you can get. Thanks for the motivation.
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-03 2:53
>>151
I was originally motivated by slow render on jasons site, it was about 2 minutes to render a tiny rectangle.
I opened the code in my Notepad2 and noticed it used closures and complex functions in the inner loop, so i refactored it and started optimizing.
'When webGL becomes a stable api(note "experimental-webgl" part) supported by all browsers, i'll consider it.'
yet webgl works in more browsers than your code, which only works with newer versions of firefox, and not only that, the window has to be a certain size!
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-03 6:52
>>157
>yet webgl works in more browsers than your code
Not in mine. WebGL is newer and less supported than canvas, require specific hardware(have you ever upgraded your video card to View a Webpage?)
>which only works with newer versions of firefox
It use ArrayBuffer and PutImageData nothing complex
>the window has to be a certain size!
its so hard to click maximize window.
why are you wasting so much time optimizing
a gimmick effect that is pretty much unwatchable after
couple seconds and dont optimize something else
and if one of your answers is
1)because i can ,well there better things to optimize
2)like what , i dont know work on something interactive
you strike me as a smart person dont confine yourself
with just this
FrozenVoid, why don't you make a canvas-based danmaku game?
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-03 10:14
>>162
Its called recreational programming or hacking: I'm not a code monkey assigned to optimize indian bloatware or open source developer striving to develop a "product".
>>165
Then hack a bit and optimize something useful, such as Hurd. You don't have to try to finish it, just improve it.
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-03 10:27
>>167
I don't "join open source projects".
I could take the code, optimize it and post to pastebin, but i will not "distribute" or "support" anything
And i certainly don't want to optimize GNU/Turd ancient code.
>>169
In open source terms i will "fork the code", and i will not improve your code i will improve my code.
Name:
Anonymous2011-11-03 10:34
>>171
Okay, do that.
As long as your code is also published under a free license, the original project can benefit from it. Also, your fork may actually be better than the original. Both are Good.
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-03 10:40
>>172
>your code is also published
I'd use creative commons for my code, but since i won't support it i won't "publish"
A fork quality is dependent on effort spent into it.
I can optimize a small 10kb script all day long with minimum effort but OS development is far more resource intensive.
LoseThos author spent 9 years to write a VGA-only Multiuser DOS clone.
If you consider effort/reward ratio for OS development(very low), its useless for hacking unless the OS itself is very small.
OS performance is not a primary goal in most cases: usability/security/design always trumps such concerns as absolute algorithmic speed(i.e. there is no point optimizing it for speed,unlike an abstract algorithm).
The idea that developing an OS is serious, productive and respectable work while coding a script is useless gimmick is like comparing
people working at orchestra and people playing a violin at home.
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-03 11:07
If you can find an algorithm(source code in JavaScript or C(i dislike debugging complex C code, but i like to write low-level bithacks which require C)) where
1.Performance is ultimate concern
2.Algorithm can be tested many time per hour
3.Its provides a useful effect,feature or some other result which depends on performance.
I'll copy it to my script folder and optimize it,
if it works better, i'll post it on /prog/ and my subreddit.
Name:
Anonymous2011-11-03 11:28
>>176
>Optimizing algorithms instead of software
Are you a Computer Scientist?
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-03 11:53
>>177
I suppose I am in some form a computer scientist, but my field of "science" is more about hacking algorithms and far removed from writing papers or proving theorems(i.e. i'm more concerned about algos as code, rather then their theoretical properties)
When i use a sine formula, i use it like a tool, i don't intend to comprehend it as long as it works(unlike a computer scientist who would describe its algorithmic complexity, minimal running time or some arcane abstract proof from algorithmic theory)
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-03 12:56
I can see the gulf between theoretical computer science and algorithm hacking as
1. the first is all about the purity of form, the algorithm has to be expressed as succinctly as possible(lambda calculus, function combinators)
2. the second is all about the purity of essence, stripping the code from internal cruft and removing inefficiency, the algorithm external look is irrelevant.
Name:
Anonymous2011-11-03 12:58
>>179
So you say computer scientists are Protoss and hackers are Zerg?
the code is a huge mess someone should put some comments
if it to be redistributed
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-04 14:08
>>187
>is a huge mess
Pretty clear to me. it precomputes a chain of tables, saves indexes to wint array and displays them frame by frame.
New version is more CPU-intensive but uses 4 times less memory(since it stores 8 bits per pixel(index)).
Name:
Anonymous2011-11-04 14:10
its pretty clear to you that spent so much time with it
if you want someone to immediately get a grip
comments are a necessity especially
when the code is a mess
>>190
How on earth that code has been mutated into >>193
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-04 15:16
>>194
>I am to lazy to read the entire thread, please post an outline
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-04 17:11
http://pastebin.com/61361hxi
Better dispframe() performance with unrolled convert loop.
render speed is the same:
120frames at 3360ms
30 frames at 902 ms
Name:
Anonymous2011-11-04 17:24
>xsum*((((xsum>=0)|0)<<1)-1)
What the fuck?
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-04 17:35
>>197
A way to calculate absolute value. Its just an alternative to express x*( x>0?1:-1) without the ternary.
Math.abs is faster(due fact JS converts doubles to int32 each time a bitwise operation is required and back.)
Name:
Anonymous2011-11-04 17:42
>>197
Wouldn't something like xsum - 2 * xsum * (xsum<0) be simpler?
If xsum is non-negative, the expression evaluates to xsum. If it is negative, it evaluates to -xsum, which would be a positive number. That's a really ignorant way to do abs(xsum).
>>201 true or false
damn, I always forget how stupid javascript is. calling 1/0 something else and after that applying a stupid operator ( OR ing with 0) to "convert" it 1/0
|0) is used to force JS to convert to int32, it can be ommited from both examples and it will run too.
xsum*(((xsum>0)<<1)-1)
one multiply one sub one shift one compare. In C code there are faster bithacks to get abs value, like (x ^ (x >> 31)) - (x >> 31) for ints
but this works for anything and not arch-specific.
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-04 22:34
In general you avoid multiplies in loops.
There more complex an OP is more cycles it consumes. Simpler opcodes yield faster code.
Using shift/add is usually a 1-cycle affair.
>>204
Why not do >>199? Also, are you sure that, in JavaScript, shifting is actually faster that multiplication?
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-05 6:01
>>207
I use Math.abs in all code now.
There couple of bithacks which suppose to be faster(like x[a>0]) but due to overhead of array access and JS bitwise operation conversion its better just calling Math.abs which gets inlined anyway.
Name:
Anonymous2011-11-05 6:05
>>208
How exactly does Math.abs work? Because, if it's the same as in Java's Math class, then it just does a<0?-a:a.
Also, how do you get it inlined? JS methods are egregiously slow.
JägerMonkey is an additional optimization to the engine in Firefox 4. It improves speed in cases where TraceMonkey optimizations fail to improve performance.[7][8]
The most publicized optimization in JägerMonkey is "method-based JIT" (that compiles code one method at a time) using inline threading (see [9]) and implements PICs, but there were multiple other optimizations implemented for Firefox 4.[10] To implement method JIT, Mozilla reused the assembler from Nitro, WebKit's JavaScript engine.[8]
The difference between TraceMonkey and JägerMonkey JIT techniques and the need for both was explained in a hacks.mozilla.org article. A more in-depth explanation of the technical details was provided by Chris Leary, one of SpiderMonkey developers, in a blog post. More technical information can be found in other developer's blogs: dvander, dmandelin.
Name:
Anonymous2011-11-05 6:10
>>210
Okay, nice.
Still, what exactly does Math.abs do?
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-05 6:14
fhttp://en.wikipedia.org/wiki/X86_instruction_listings#Original_8087_instructions
FABS Absolute value of float.
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-05 6:30
>>211
it depends on code actually. Sometimes it just an sign removal to normalize a formula sometimes its a switch to positive(backwards to NEG)
In this the negative indexes for pallette get converted to unsigned positive bytes from -1 to 1 into 0 to 255
d1=(abs(temp1+(temp1&1)-rep1)*maxcolor)
d2=(abs(temp2+(temp2&1)-rep2)*maxcolor)
d3=(abs(temp3+(temp3&1)-rep3)*maxcolor)
d4=(abs(temp4+(temp4&1)-rep4)*maxcolor)
d5=(abs(temp5+(temp5&1)-rep5)*maxcolor)
d6=(abs(temp6+(temp6&1)-rep6)*maxcolor)
d7=(abs(temp7+(temp7&1)-rep7)*maxcolor)
d8=(abs(temp8+(temp8&1)-rep8)*maxcolor)
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-05 6:34
a value of Abs(-0.345)* maxcolor is 0.345 * 255 which is 87.975|0 which is 87th color from pallette
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-05 6:36
I use to have da[-maxcolor,maxcolor] with temp1&1 as selector but array access was slower than Math.abs(Firefox 10 here)
Name:
Anonymous2011-11-05 6:37
>>213
No, I meant what's the source of JavaScript's Math.abs method, how does it get get the absolute value? Bit operations? Branching?
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-05 6:44
>>216
I have no idea, it depends on browser,JS engine optimizations, but in Firefox 10 its faster than ternary x?x:-x by a factor of 2-4.
If its faster than ternary there 2 options:
1.they can use Fabs(1 cycle opcode:fastest, though requiring this asm intruction)
2.they use a bithack like mine inlined(unlikely, will be slower in most cases since it more opcodes)
3.They use a ternary, which is impossible since manually inlined ternary is 4 times slower.
I don't see any other options, and since >>218 uses Fabs to emit the end code(Clang is latest Mozilla toy for compiling firefox faster) http://blog.mozilla.com/respindola/2011/05/06/firefox-builds-with-clang/
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-05 7:55
after browsing the internals of Mozilla Aurora it comes to this:
MATH_BUILTIN_1(js_math_abs, fabs)
JSBool
js_math_abs(JSContext *cx, uintN argc, Value *vp)
{
jsdouble x, z;
if (argc == 0) {
vp->setDouble(js_NaN);
return JS_TRUE;
}
if (!ValueToNumber(cx, vp[2], &x))
return JS_FALSE;
z = fabs(x);//<-- C fabs compiled to FABS on x86
vp->setNumber(z);
return JS_TRUE;
}
Apparently FF caches cosines too..That explains why my optimized cos was on the same order of magnitude speed.
static JSBool
math_cos(JSContext *cx, uintN argc, Value *vp)
{
jsdouble x, z;
if (argc == 0) {
vp->setDouble(js_NaN);
return JS_TRUE;
}
if (!ValueToNumber(cx, vp[2], &x))
return JS_FALSE;
MathCache *mathCache = GetMathCache(cx);
if (!mathCache)
return JS_FALSE;
z = mathCache->lookup(cos, x);
vp->setDouble(z);
return JS_TRUE;
}
>>225
Math.abs is C fabs(double) which compiles to FABS which is 1 cycle in all modern processors
xsum*(1-((xsum<0)<<1)) is at least 5 cycles and JS will insist on converting doubles to Int32 to use bitwise math(shifts).
There is no point optimizing it when Firefox uses asm code inlined for your methods.
x* ((((x >= 0)) << 1) - 1) is equivalent to xsum*(1-((xsum<0)<<1)) as 1 - 2:0 and 2:0 -1
Name:
Anonymous2011-11-05 10:46
>>226
It does not use bit shift on double, it is on boolean.
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-05 10:53
>>227
a double type is considered a universal in javascript. It does not matter if intermediates are int32, it int32 only at the point of calculations)
xsum=-2.02
xsum*(1-((xsum<0)<<1)) becomes:
xsum<0 = true
true<<1 =int32 (true:1)<<1= 2
1-2=-1
*=-1(double)-> -1.0000000 (converted to double)
xsum*-1.0000000
All numbers in Javascript are 64bit (8 bytes) floating point numbers which yields an effective range of 5e-324 (negative) to 1.7976931348623157e+308 (positive) at the time this article was written (this may eventually change to 128 bits in the future as 64 bit processors become commonplace and the ECMA standards evolve).
Integers are considered reliable (numbers without a period or exponent notation) to 15 digits (9e15) [1]. Floating point numbers are considered only as reliable as possible and no more! This is an especially important concept to understand for currency manipulation as 0.06 + 0.01 resolves to 0.06999999999999999 instead of 0.07.
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-05 11:16
Bitwise Operators
Bitwise operations are a bit of a hack in Javascript. Since all numbers in Javascript are floating point, and bitwise operators only work on integers, Javascript does a little behind the scenes magic to make it appear bitwise operations are being applied to a 32bit signed integer.
Specifically, Javascript takes the number you are working on and takes the integer portion of the number. It then converts the integer to the most number of bits that number represents, up to 31 bits (1 bit for the sign). So 0 would create a two bit number (1 for the sign, and 1 bit for 0), likewise 1 would create two bits. 2 would create a 3 bit number, 4 would create a 4 bit number, etc…
It's important to realize that you're not guaranteed a 32bit number, for instance running not on zero should, in theory, convert 0 to 4,294,967,295, instead it will return -1 for two reasons, the first being that all numbers are signed in Javascript so "not" always reverses the sign, and second Javascript couldn't make more than one bit from the number zero and not zero becomes one. Therefore ~0=-1.
So bitwise signs in Javascript are up to 32 bits.
Operator Description Notes
& AND 1&1=1,1&0=0
| OR 1|0=1, 0|0=0
^ XOR 1^1=0, 1^0=1
~ NOT (Unary) ~1=0, ~0=-1
<< Shift Left 1<<2=4 -- shift 1, 2 bits left
>> Shift Right 4>>2=1 -- shift 4, 2 bits right (*)
>>> Shift Right 4>>>2=1 -- shift 4, 2 bits right (*)
(*) When shifting right, double greater-thans (>>) will fill the new bits to the far left as 1s if the number was negative and zero if the number was positive. tripple greater-thans (>>>) is the same as double greater-thans but the fill bit will always be zero so the sign of the original number is not preserved and the result is always positive.
With the exception of the bitwise NOT operator (~), all operators can be expressed as (operator)= when working with the same number as the variable.
x = x&5; // is the same as x &= 5;
x = x|5; // is the same as x |= 5;
x = x^5; // is the same as x ^= 5;
x = x<<5; // is the same as x <<= 5;
x = x>>5; // is the same as x >>= 5;
x = x>>>5; // is the same as x >>>= 5;
One of the most common mistakes in Javascript is to use a bitwise operator in the place of a logical operator. For instance comparing two variables is expressed with the logical operator (&&), using a single & instead of a double && can yield unintended results. To avoid confusion you should always wrap bitwise operations in parenthesis to ensure it is not considered a logical evaluation!
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-05 11:23
I'm waiting when JS will get native Int32 type(not typed arrays, an integer from C) and this behind the scenes conversion will cease.
I can't write bithacks and watch them get stalled converting integers represented as doubles to integers and back to doubles.
>>236
Not all bitwise operations are bithacks. A bithack is a low-level trick which replaces something complex with a series of low-latency opcodes.
A xsum*((((xsum>=0)|0)<<1)-1) is bithack in sense it replaces a "complex" function call for Math.abs(its externally complex, but in reality is inlined to fabs(x)) with several OP codes which do not stall the pipeline.
A ternary xsum=xsum>0?xsum:-xsum introduces a branch which stalls the pipepine and if mispredicted will lose many cycles while the above codes suffers no penalty, though it takes longer then calling a specific opcode for this operation in ASM(whic fabs reduces to)
Name:
Anonymous2011-11-05 11:50
yep but i really stopped using bithacks
main reason the code becomes unreadable
but given the state of the current code
doesnt matter really
>>240 A bithack is a low-level trick which replaces something complex with a series of low-latency opcodes
nope, they are still bitwise operations. (xsum>=0)[b]|[/b]0
another reason why JS is shit. You are just making an unnecessary operation. it is Java's fault because if it does not have a proper type conversion. (or proper types at all) (xsum>=0)|0)[b]<<[/b]1
holy shit, he replaced *2 with <<1. Stop the presses, we have a second Einstein here. xsum[b]*[/b]((((xsum>=0)|0)<<1)[b]-[/b]1)
these are not bit wise operations
so you have 2 bitwise operations in your "bithack". one simply replaces *2 other is used to covert something into integer.
also I wonder how many cycles xsum=xsum>0?xsum:-xsum losts in a branch prediction. Does it really justify an addition, bitshift and a multiplication operation.
seriosuly, if you think bitwise operations are cool and into "bithack", go play with C and do something like this http://codepad.org/d2C0BhOB
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-05 11:56
Actually i'm set on rewriting the code in C.
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-05 11:56
>>242
Try replacing Math.abs in my script with ternaries.
>>244
I don't do javascript but tested it in C. http://codepad.org/M7myWRnr
results are 25622 clocks for tenary and 30587 clocks for your bithax.
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-05 12:42
>>242
I don't pretend to be a genius. Its a "hacking for fun" stuff.
I'll use as many exotic and quirky ways to program as i want as long as it useful for me.
You can laugh that i spend time on some "bithacks" but i'm exploring various algorithms and their simplified forms to my leisure.
JavaScript is very good for prototyping the "abstract program"(like e.g.LISP), only when the stage of micro-optimization is reached the flaws of internals are exposed. >>246
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define LEN 10000
inline unsigned long long rdtsc(){__asm{RDTSC}}
void main(){
int i, j, z;
unsigned long long c1, c2;
int arr[LEN];
for(i=0; i<LEN; i++) arr[i] =rand()%10000-5000;
//with branch
c1 = rdtsc();
for(j=0;j<LEN;j++) z = arr[j]>0?arr[j]:-arr[j];
>>249
yeah but we were testing if your algorithm beats branch tests or not. surely you can find a better algorithm for C
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-05 12:54
Okay, you'll be mad.
C:\Program Files\dmc8.50\dmc\dm\bin\code>abs
Cycles spent:30109 <- ternary
Cycles spent:30087 < with |0
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-05 12:55
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define LEN 10000
inline unsigned long long rdtsc(){__asm{RDTSC}}
void main(){
int i, j, z;
unsigned long long c1, c2;
int arr[LEN];
for(i=0; i<LEN; i++) arr[i] =rand()%10000-5000;
//with branch
c1 = rdtsc();
for(j=0;j<LEN;j++) z = arr[j]>0?arr[j]:-arr[j];
are you sure you disabled optimizations? since it is same I am assuming |0 is optimized out
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-05 12:58
C:\Program Files\dmc8.50\dmc\dm\bin\code>abs
Cycles spent:203969
Cycles spent:184612
Without optimizations
Name:
Anonymous2011-11-05 13:00
>>254
Damn, we should insert |0 everywhere the. Since it costs negative clock cycles.
or your compiler still optimizes it out
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-05 13:02
C:\Program Files\dmc8.50\dmc\dm\bin\code>abs
z = arr[j]>0?arr[j]:-arr[j]; Cycles spent:204355
z = ((-arr[j])<<(arr[j]<0))+((arr[j])<<(arr[j]>0)); Cycles spent:186485
code (i expected adds to be faster):
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define LEN 10000
inline unsigned long long rdtsc(){__asm{RDTSC}}
void main(){
int i, j, z;
unsigned long long c1, c2;
int arr[LEN];
for(i=0; i<LEN; i++) arr[i] =rand()%10000-5000;
//with branch
c1 = rdtsc();
for(j=0;j<LEN;j++) z = arr[j]>0?arr[j]:-arr[j];
//bithax
c1 = rdtsc();
for(j=0;j<LEN;j++) z =((-arr[j])<<(arr[j]<0))+((arr[j])<<(arr[j]>0));
c2 = rdtsc();
printf(" z = ((-arr[j])<<(arr[j]<0))+((arr[j])<<(arr[j]>0)); Cycles spent:%llu\n", c2-c1);
}
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-05 13:05
>>255
Nope it should cost more clock cycles but it does something to my CPU and it makes it complete faster.
Maybe it ensures some pipeline integrity or forces some intermediates to be present in registers.
; Disassembly of file: abs.obj
; Sat Nov 05 19:49:12 2011
; Mode: 32 bits
; Syntax: MASM/ML
; Instruction set: Pentium
.586
.model flat
public _main
public _rdtsc ; Note: Communal. Not supported by MASM
extern _rand: near
extern _printf: near
extern _rdtsc: near
extern __acrtused_con: byte
FLAT GROUP
_TEXT SEGMENT DWORD PUBLIC 'CODE' ; section number 1
CONST SEGMENT DWORD PUBLIC 'CONST' ; section number 3
CONST ENDS
_BSS SEGMENT DWORD PUBLIC 'BSS' ; section number 4
_BSS ENDS
_text$_rdtsc SEGMENT DWORD PUBLIC 'CODE' ; section number 5
; Communal section not supported by MASM
_rdtsc PROC NEAR
; COMDEF _rdtsc
rdtsc ; 0000 _ 0F 31
ret ; 0002 _ C3
_rdtsc ENDP
_text$_rdtsc ENDS
END
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-05 13:08
The code with |0 which magically speeds it up(like in JavaScript..)
; Disassembly of file: abs.obj
; Sat Nov 05 19:49:12 2011
; Mode: 32 bits
; Syntax: MASM/ML
; Instruction set: Pentium
.586
.model flat
public _main
public _rdtsc ; Note: Communal. Not supported by MASM
extern _rand: near
extern _printf: near
extern _rdtsc: near
extern __acrtused_con: byte
FLAT GROUP
_TEXT SEGMENT DWORD PUBLIC 'CODE' ; section number 1
Conclusion: no magic occurs, ternary just get optimized very well by DMC and branchless bithacks are equivalent speed but -3% faster when unoptimized code is generated. This is optimized code with ternary vs bithack without |0:(ternary wins by 17 cycles)
C:\Program Files\dmc8.50\dmc\dm\bin\code>abs
Cycles spent:30110
Cycles spent:30127
; Disassembly of file: abs.obj
; Sat Nov 05 20:18:42 2011
; Mode: 32 bits
; Syntax: MASM/ML
; Instruction set: Pentium
.586
.model flat
public _main
public _rdtsc ; Note: Communal. Not supported by MASM
extern _rand: near
extern _printf: near
extern _rdtsc: near
extern __acrtused_con: byte
FLAT GROUP
_TEXT SEGMENT DWORD PUBLIC 'CODE' ; section number 1
_DATA SEGMENT DWORD PUBLIC 'DATA' ; section number 2
?_010 label byte
db 43H, 79H, 63H, 6CH, 65H, 73H, 20H, 73H ; 0000 _ Cycles s
db 70H, 65H, 6EH, 74H, 3AH, 25H, 6CH, 6CH ; 0008 _ pent:%ll
db 75H, 0AH, 00H ; 0010 _ u..
_DATA ENDS
CONST SEGMENT DWORD PUBLIC 'CONST' ; section number 3
CONST ENDS
_BSS SEGMENT DWORD PUBLIC 'BSS' ; section number 4
_BSS ENDS
_text$_rdtsc SEGMENT DWORD PUBLIC 'CODE' ; section number 5
; Communal section not supported by MASM
_rdtsc PROC NEAR
; COMDEF _rdtsc
rdtsc ; 0000 _ 0F 31
ret ; 0002 _ C3
_rdtsc ENDP
_text$_rdtsc ENDS
END
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-05 13:52
|0 is never present in the code: both cases in unoptimized code win over ternary.
Optimized code results in same speed for both(about 10-20 cycles difference)
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-05 14:04
>>261 i meant +30% faster. I'm going to sleep now.
Name:
Anonymous2011-11-05 14:59
http://codepad.org/NTrrmr2O Branch: 1670000
Bit hack: 1860000
Subtraction: 2350000
XOR with sign: 1770000
asm: 1660000
abs(): 1670000
On an Atom processor, compiled with GCC 4.6.1, with no optimizations.
Sorry if it's less that optimal, I'm not that good with asm.
Name:
Anonymous2011-11-05 15:28
>>264 arr[i] = i % 2 ? 123456789 : -123456789 ; // random values would be stupid
>CPUs without branch predictors would be even more stupid
Name:
Anonymous2011-11-05 15:31
>>265
With random values, it's possible that you'll get positive numbers everywhere.
Name:
Anonymous2011-11-05 20:23
I've reached satori like a beast and shat myself. Thanx op.
Name:
Anonymous2011-11-06 0:18
>>266
Without random values you always get positive number at even cells. You're an obvious troll.
Name:
Anonymous2011-11-06 1:01
"I'm waiting when JS will get native Int32 type"
is that ever going to happen? there's no mention of it on the harmony wiki for example
uint32_t Unsigned 32-bit integer.
int64_t Signed 64-bit integer.
These are the ones i want supported and not in the way with Int64 "object"
Note: Some 64-bit values are outside the range of numeric values supported by JavaScript. Because of this, ctypes.int64 and ctypes.uint64 do not automatically convert to JavaScript numbers. Instead, they convert to objects of the wrapper types ctypes.Int64 and ctypes.UInt64, which are JavaScript objects rather than CData objects. See 64-bit integers for details.
Mozilla is retarded, they are sitting on a technology that enables C-level performance without any hacks.
They still insist all JS cludges need to be preserved and every interaction with a datatype is done on objects rather than JITting opcodes to primitive C types(which all the code eventually does in some way, since Sepples is not a magical sandbox).
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-06 2:49
>>269
Also, ECMA is insufferable ancient bureaucracy that should have no place to decide what JS becomes.
Once a single decent browser implements native C types and efficient JIT without GC(no GC whatsoever) everyone else will strive to copy it or be left in the dust. And i have couple of ideas that make performance of browsers skyrocket
1. Prototypes are made C function pointers. Prototypes can be aliased, exchanged and set by code as pointer values.
2.All types are specifically either primitive(UInt32,Int8,Float64) or complex(Object,Array) and there is no implicit type conversion on primitives. Primitives should run at full speed without any interference by JS engine.
3.GC should either be removed(delete and new are enough) or delegated to idle threads. Only when app is completely idle GC should start.
4.all assignment/retrieval/math operations on pritimives and arrays/objects consisting of primitive are translated to direct machine code without any method calls or checks to ensure ("the object is the right type and range of values").
5. JS canvas should have more options on format of data presented instead of 32bit pixel arrays which can be manipulated byte at a time(excluding specific hacks to move data with ImageData arrays). Canvas pixel array should have wide variety of pixel formats, transparency options and should can be manipulated easily with array ops and draw commands on raw data(not displayed pixles but PixelArray itself).e.g.
setRowOfPixels(single int color),setPixel(x,y,single int color), setRectangle(x=bottom left,y=top right,single int color)
6.WebGL has to be reworked as JS method API (with optional low-level code) and it has to be hardware independent(like canvas).
Name:
Anonymous2011-11-06 3:05
>>275
How do you dynamically and automatically manage memory without GC?
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-06 3:33
In small apps which require a little memory you can ignore the leaks and concentrate on performance.
In big programs new and delete will be used to reclaim memory previously allocated(like malloc and free, but operating on typed objects)
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-06 3:35
If you want GC that badly just make it start on command like GC.cleanupStart or GC.enable like D runtime does
please, lose the trip, use sage if you have nothing to contribute and stop bumping your thread with stupid things everyone knows or nobody cares.
js will never get manual memory management. it might get more proper data types but there will be always some type and error checking. it was shit for last ~two decades and it will continue to be shit.
>>279
It's his own thread, let him be. We can also bump old threads with relevant new posts. Yes, he has a trip, yes it's slightly annoying but otherwise tolerable; you can use that information to block out his posts automatically using greasemonkey
Compact version:
<html><head><style>html,body{width:100%;height:100%;margin:0px;}
</style></head><body><canvas id='c' ></canvas></body>
<script>var inittime=Date.now();var starttime=Date.now()
const frcount=30 //more frames just repeat sine pattern
const zoom=0.125//optimal zoom for 1920x1080
var ic,co,sum,bug=0;
function check(){ if(!bug){bug=1;addtm("->R+")}}
function checkstr(str){ if(!bug){bug=1;addtm(str+".")}}
function checks(str){ if(!frame &&!flag){addtm(str)}}
function addtm(str){document.title+=Date.now()-starttime+str;starttime=Date.now()}
function settm(str){document.title=Date.now()-starttime+str;starttime=Date.now()}
function dump(a)document.writeln(a.toString())
var abs=Math.abs
var cos=Math.cos
var sin=Math.sin
var w =window.innerWidth
var h =window.innerHeight
w=w-w%8;//unroll factor
var halfantiw=w*0.5*zoom;
var halfantih=h*0.5*zoom;
var canvas3=document.getElementById('c');
var context=canvas3.getContext("2d");
canvas3.width=w;
canvas3.height=h;
const size=w*h*4
var elsize=w*h;elsize+=(4-(elsize%4))
var wint=[];
for(i=0;i<frcount;i++){
wint[i]=Uint32Array(ArrayBuffer(elsize));}
var frame = 0,ccs;
var xcomcoss=Array(frcount)
var xcomsins=Array(frcount)
for(var co=0;co<frcount;co++){
ccs=co*0.20943951023931953
xcomcoss[co]=cos(ccs)
xcomsins[co]=sin(ccs)}
var i,preycache;
var preyfsin1cos=Array(h);
var preyfsin2cos=Array(h);
var preyfsin3cos=Array(h);
var preyfsin1sin=Array(h);
var preyfsin2sin=Array(h);
var preyfsin3sin=Array(h);
var pc1,pc2,pc3
for(i=0;i<h;i++){
preycache=i*zoom-halfantih;
pc1=preycache*0.4338837391175581
pc2=preycache*0.7818314824680298
pc3=preycache*0.9749279121818236
preyfsin1cos[i]=cos(pc1)
preyfsin1sin[i]=sin(pc1)
preyfsin2cos[i]=cos(pc2)
preyfsin2sin[i]=sin(pc2)
preyfsin3cos[i]=cos(pc3)
preyfsin3sin[i]=sin(pc3)
}
var prexs1cos=Array(w);
var prexs2cos=Array(w);
var prexs3cos=Array(w);
var hprecos=Array(w)
var hpresin=Array(w)
for(i=0;i<w;i++){
preycache=i*zoom - halfantiw
hpresin[i]=sin(preycache)*0.5
hprecos[i]=cos(preycache)*0.5
prexs1cos[i]=cos(preycache*0.9009688679024191)
prexs2cos[i]=cos(preycache*0.6234898018587336)
prexs3cos[i]=cos(preycache*0.22252093395631445)}
var prodxf1=Array(h)
var prodxs1=Array(h)
var p,p2,p3,p4,p5,p6,i,co
var pc1,pc2,pc3,pc4,pc5,pc6
var ec1,ec2,ec3;
for( i=0;i<h;i++){
prodxf1[i]=Array(w);
p=prodxf1[i];
prodxs1[i]=Array(w);
p4=prodxs1[i]
pc1=preyfsin1cos[i];
pc2=preyfsin2cos[i];
pc3=preyfsin3cos[i];
pc4=preyfsin1sin[i];
pc5=preyfsin2sin[i];
pc6=preyfsin3sin[i];
for(co=0;co<w;co++){
ec1=prexs1cos[co]
ec2=prexs2cos[co]
ec3=prexs3cos[co]
p[co]=pc1*ec1+pc2*ec2+pc3*ec3+hprecos[co];
p4[co]=pc4*ec1+pc5*ec2+pc6*ec3+hpresin[co];;}
}
function redraw(){
var d1,d2,d3,d4,d5,d6,d7,d8
var xf1,xs1,y,x,i,intload=wint[frame],xfracos=xcomcoss[frame%30],xfrasin=xcomsins[frame%30];
var r1,r2,r3,r4,r5,r6,r7,r8;
var temp1,temp2,temp3,temp4,temp5,temp6,temp7,temp8;
746ms - render
<html><head><style>html,body{width:100%;height:100%;margin:0px;}
</style></head><body><canvas id='c' ></canvas></body>
<script>var inittime=Date.now();var starttime=inittime;
function addtm(str){document.title+=Date.now()-starttime+str;starttime=Date.now()}
function settm(str){document.title=Date.now()-starttime+str;starttime=Date.now()}
function dump(a)document.writeln(a.toString())
var abs=Math.abs
var cos=Math.cos
var sin=Math.sin
var w =window.innerWidth
var h =window.innerHeight
w=w-w%8;//unroll factor
var halfantiw=w*0.0625;
var halfantih=h*0.0625;
var h8=h*8
var w8=w*8
var canvas3=document.getElementById('c');
var context=canvas3.getContext("2d");
canvas3.width=window.innerWidth;
canvas3.height=window.innerHeight;
const size=w*h*4
var elsize=w*h;elsize+=(4-(elsize%4))
var wint=[];
for(i=0;i<30;i++){wint[i]=Uint32Array(ArrayBuffer(elsize));}
var frame = 0;
var i,preycache;
var preyfsin1cos=Float64Array(ArrayBuffer(h8))
var preyfsin2cos=Float64Array(ArrayBuffer(h8))
var preyfsin3cos=Float64Array(ArrayBuffer(h8))
var preyfsin1sin=Float64Array(ArrayBuffer(h8))
var preyfsin2sin=Float64Array(ArrayBuffer(h8))
var preyfsin3sin=Float64Array(ArrayBuffer(h8))
var prexs1cos=Float64Array(ArrayBuffer(w8))
var prexs2cos=Float64Array(ArrayBuffer(w8))
var prexs3cos=Float64Array(ArrayBuffer(w8))
var hprecos=Float64Array(ArrayBuffer(w8))
var hpresin=Float64Array(ArrayBuffer(w8))
var prodxf1=Array(h)
var prodxs1=Array(h)
for( i=0;i<h;i++){
prodxf1[i]=Float64Array(ArrayBuffer(w8));
prodxs1[i]=Float64Array(ArrayBuffer(w8));
}
var p,p2,p3,p4,p5,p6,i,co
var pc1,pc2,pc3,pc4,pc5,pc6
var ec1,ec2,ec3;
for( i=0;i<h;i++){
p=prodxf1[i];
p4=prodxs1[i]
pc1=preyfsin1cos[i];
pc2=preyfsin2cos[i];
pc3=preyfsin3cos[i];
pc4=preyfsin1sin[i];
pc5=preyfsin2sin[i];
pc6=preyfsin3sin[i];
for(co=0;co<w;co++){
ec1=prexs1cos[co]
ec2=prexs2cos[co]
ec3=prexs3cos[co]
p[co]=pc1*ec1+pc2*ec2+pc3*ec3+hprecos[co];
p4[co]=pc4*ec1+pc5*ec2+pc6*ec3+hpresin[co];;}
}
addtm("prec,")
function redraw(){
var d1,d2,d3,d4,d5,d6,d7,d8;
var n1,n2,n3,n4,n5,n6,n7,n8;
var xf1,xs1,y,x,i,intload=wint[frame],xfracos=cos(frame*0.20943951023931953),xfrasin=sin(0.20943951023931953*frame++);
var r1,r2,r3,r4,r5,r6,r7,r8;
var temp1,temp2,temp3,temp4,temp5,temp6,temp7,temp8;
for(var y=0,i=0;y<h;y++){xf1=prodxf1[y];xs1=prodxs1[y];
for(x=0;x<w;x+=8) {
r1=3.5+xf1[x]*xfracos-xs1[x]*xfrasin
r2=3.5+xf1[x+1]*xfracos-xs1[x+1]*xfrasin
r3=3.5+xf1[x+2]*xfracos-xs1[x+2]*xfrasin
r4=3.5+xf1[x+3]*xfracos-xs1[x+3]*xfrasin
r5=3.5+xf1[x+4]*xfracos-xs1[x+4]*xfrasin
r6=3.5+xf1[x+5]*xfracos-xs1[x+5]*xfrasin
r7=3.5+xf1[x+6]*xfracos-xs1[x+6]*xfrasin
r8=3.5+xf1[x+7]*xfracos-xs1[x+7]*xfrasin
temp1=(r1|0)
temp2=(r2|0)
temp3=(r3|0)
temp4=(r4|0)
temp5=(r5|0)
temp6=(r6|0)
temp7=(r7|0)
temp8=(r8|0)
n1=(abs(temp1+(temp1&1)-r1)*0xff)
n2=(abs(temp2+(temp2&1)-r2)*0xff)
n3=(abs(temp3+(temp3&1)-r3)*0xff)
n4=(abs(temp4+(temp4&1)-r4)*0xff)
n5=(abs(temp5+(temp5&1)-r5)*0xff)
n6=(abs(temp6+(temp6&1)-r6)*0xff)
n7=(abs(temp7+(temp7&1)-r7)*0xff)
n8=(abs(temp8+(temp8&1)-r8)*0xff)
intload[i++]=(n1)|(n2<<8)|(n3<<16)|(n4<<24)
intload[i++]=(n5)|(n6<<8)|(n7<<16)|(n8<<24); }}}
while(frame<30)redraw();
var RGB=[],ic,ir,ig,ib;
for(var ic=0;ic<0xff;ic++){
ir=ic-31;ir*=ir>2;ig=ic-81;ig*=ig>8;ig=ig<<8;ib=(ic)<<16
RGB[ic]=(ir|ig|ib)|0xff000000;}
var dispc=[];
window.requestAnimationFrame=window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame;
function dispframe(){if(++frame >= 30)frame = 0;
if(!dispc[frame]){dispc[frame]={width:w,height:h,data:Uint8ClampedArray(ArrayBuffer(size))};
var tv=Uint32Array(dispc[frame].data.buffer);
var intpixels=Uint8Array(wint[frame].buffer);
for(var op=0,c=0;c<elsize;){tv[op++]=RGB[intpixels[c++]];}
delete(wint[frame]);}
context.putImageData(dispc[frame],0,0);
window.requestAnimationFrame(dispframe);}
addtm("ms render");dispframe();
</script></html>
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-09 1:27
735 ms
<html><head><style>html,body{width:100%;height:100%;margin:0px;}
</style></head><body><canvas id='c' ></canvas></body>
<script>var inittime=Date.now();var starttime=inittime;
function addtm(str){document.title+=Date.now()-starttime+str;starttime=Date.now()}
function settm(str){document.title=Date.now()-starttime+str;starttime=Date.now()}
function dump(a)document.writeln(a.toString())
var abs=Math.abs
var cos=Math.cos
var sin=Math.sin
var w=window.innerWidth
var h =window.innerHeight
w=w-w%8;//unroll factor
var halfantiw=w*0.0625;
var halfantih=h*0.0625;
var h8=h*8
var w8=w*8
var canvas3=document.getElementById('c');
var context=canvas3.getContext("2d");
canvas3.width=window.innerWidth;
canvas3.height=window.innerHeight;
const size=w*h*4
var elsize=w*h;elsize+=(4-(elsize%4))
var wint=[];
for(i=0;i<30;i++){wint[i]=Uint32Array(ArrayBuffer(elsize));}
var frame = 0;
var i,preycache;
var preyfsin1cos=Float64Array(ArrayBuffer(h8))
var preyfsin2cos=Float64Array(ArrayBuffer(h8))
var preyfsin3cos=Float64Array(ArrayBuffer(h8))
var preyfsin1sin=Float64Array(ArrayBuffer(h8))
var preyfsin2sin=Float64Array(ArrayBuffer(h8))
var preyfsin3sin=Float64Array(ArrayBuffer(h8))
var prexs1cos=Float64Array(ArrayBuffer(w8))
var prexs2cos=Float64Array(ArrayBuffer(w8))
var prexs3cos=Float64Array(ArrayBuffer(w8))
var hprecos=Float64Array(ArrayBuffer(w8))
var hpresin=Float64Array(ArrayBuffer(w8))
var prodxf1=Array(h)
var prodxs1=Array(h)
for( i=0;i<h;i++){
prodxf1[i]=Float64Array(ArrayBuffer(w8));
prodxs1[i]=Float64Array(ArrayBuffer(w8));
}
var p,p2,p3,p4,p5,p6,i,co
var pc1,pc2,pc3,pc4,pc5,pc6
var ec1,ec2,ec3;
for( i=0;i<h;i++){
p=prodxf1[i];
p4=prodxs1[i]
pc1=preyfsin1cos[i];
pc2=preyfsin2cos[i];
pc3=preyfsin3cos[i];
pc4=preyfsin1sin[i];
pc5=preyfsin2sin[i];
pc6=preyfsin3sin[i];
for(co=0;co<w;co++){
ec1=prexs1cos[co]
ec2=prexs2cos[co]
ec3=prexs3cos[co]
p[co]=pc1*ec1+pc2*ec2+pc3*ec3+hprecos[co];
p4[co]=pc4*ec1+pc5*ec2+pc6*ec3+hpresin[co];;}
}
var rs=Float64Array(ArrayBuffer(64));
var ns=Float64Array(ArrayBuffer(64));
var temps=Int32Array(ArrayBuffer(32))
var lvars=Int32Array(ArrayBuffer(32))
function redraw(){
var xf1,xs1,y=lvars[0],x=lvars[1],i=lvars[2],intload=wint[frame],xfracos=cos(frame*0.20943951023931953),xfrasin=sin(0.20943951023931953*frame++);
var r1=rs[0],r2=rs[1],r3=rs[2],r4=rs[3],r5=rs[4],r6=rs[5],r7=rs[6],r8=rs[7];
var n1=ns[0],n2=ns[1],n3=ns[2],n4=ns[3],n5=ns[4],n6=ns[5],n7=ns[6],n8=ns[7];
var temp1=temps[0],temp2=temps[1],temp3=temps[2],temp4=temps[3],temp5=temps[4],temp6=temps[5],temp7=temps[6],temp8=temps[7];
Nightly can be installed along with old versions(it will not overwrite Firefox 3.6.2,and any extensions can be enabled if you use Nightly tester tools)
>My shit only works on pre-pre-pre alpha nightly ghetto builds
Sure is [undelrine}[overline][strong][emphasis]EXPERT PROGRAMMER here.[/italic][/strong][/overtheline][/underline]
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-09 22:16
725ms minor changes
<html><head><style>html,body{width:100%;height:100%;margin:0px;}
</style></head><body><canvas id='c' ></canvas></body>
<script>//722ms new record
var inittime=Date.now();var starttime=inittime;
function addtm(str){document.title+=Date.now()-starttime+str;starttime=Date.now()}
function settm(str){document.title=Date.now()-starttime+str;starttime=Date.now()}
function dump(a)document.writeln(a.toString())
var abs=Math.abs
var cos=Math.cos
var sin=Math.sin
var w=window.innerWidth
var h =window.innerHeight
w=w-w%8;//unroll factor
var halfantiw=w*0.0625;
var halfantih=h*0.0625;
var h8=h*8
var w8=w*8;
var canvas3=document.getElementById('c');
var context=canvas3.getContext("2d");
canvas3.width=window.innerWidth;
canvas3.height=window.innerHeight;
const size=w*h*4
var elsize=w*h;elsize+=(4-(elsize%4))
var wint=[];
for(i=0;i<30;i++){wint[i]=Uint32Array(ArrayBuffer(elsize));}
var frame = 0;
var i,preycache;
var rs=Float64Array(ArrayBuffer(64));
var ns=Float64Array(ArrayBuffer(64));
var temps=Int32Array(ArrayBuffer(32))
var lvars=Int32Array(ArrayBuffer(32))
var fcos=Float64Array(ArrayBuffer(8*30));
var fsin=Float64Array(ArrayBuffer(8*30));
var preyfsin1cos=Float64Array(ArrayBuffer(h8))
var preyfsin2cos=Float64Array(ArrayBuffer(h8))
var preyfsin3cos=Float64Array(ArrayBuffer(h8))
var preyfsin1sin=Float64Array(ArrayBuffer(h8))
var preyfsin2sin=Float64Array(ArrayBuffer(h8))
var preyfsin3sin=Float64Array(ArrayBuffer(h8))
var prexs1cos=Float64Array(ArrayBuffer(w8))
var prexs2cos=Float64Array(ArrayBuffer(w8))
var prexs3cos=Float64Array(ArrayBuffer(w8))
var hprecos=Float64Array(ArrayBuffer(w8))
var hpresin=Float64Array(ArrayBuffer(w8))
var prodxf1=Array(h)
var prodxs1=Array(h)
for( i=0;i<h;i++){
prodxf1[i]=Float64Array(ArrayBuffer(w8));
prodxs1[i]=Float64Array(ArrayBuffer(w8));
}
var p,p2,p3,p4,p5,p6,i,co
var pc1,pc2,pc3,pc4,pc5,pc6
var ec1,ec2,ec3;
for( i=0;i<h;i++){
p=prodxf1[i];
p4=prodxs1[i]
pc1=preyfsin1cos[i];
pc2=preyfsin2cos[i];
pc3=preyfsin3cos[i];
pc4=preyfsin1sin[i];
pc5=preyfsin2sin[i];
pc6=preyfsin3sin[i];
for(co=0;co<w;co++){
ec1=prexs1cos[co]
ec2=prexs2cos[co]
ec3=prexs3cos[co]
p[co]=pc1*ec1+pc2*ec2+pc3*ec3+hprecos[co];
p4[co]=pc4*ec1+pc5*ec2+pc6*ec3+hpresin[co];;}
}
function redraw(){
var xf1,xs1,y=lvars[0],x=lvars[1],i=lvars[2],intload=wint[frame],xfracos=lvars[3]=fcos[frame],xfrasin=lvars[4]=fsin[frame++];
var r1=rs[0],r2=rs[1],r3=rs[2],r4=rs[3],r5=rs[4],r6=rs[5],r7=rs[6],r8=rs[7];
var n1=ns[0],n2=ns[1],n3=ns[2],n4=ns[3],n5=ns[4],n6=ns[5],n7=ns[6],n8=ns[7];
var temp1=temps[0],temp2=temps[1],temp3=temps[2],temp4=temps[3],temp5=temps[4],temp6=temps[5],temp7=temps[6],temp8=temps[7];
>>294
No one cares. You failed at life. Go kill yourself you dumb nigger.
Name:
Anonymous2011-11-09 23:09
>>295
Just chill bro. It's FV posting in his own thread. Go bump an old thread with relevant advice if that makes you feel better.
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-10 1:04
701ms
<html><head><style>html,body{width:100%;height:100%;margin:0px;}
</style></head><body><canvas id='c' ></canvas></body>
<script>//701ms current
var inittime=Date.now();var starttime=inittime;
function addtm(str){document.title+=Date.now()-starttime+str;starttime=Date.now()}
function settm(str){document.title=Date.now()-starttime+str;starttime=Date.now()}
function dump(a)document.writeln(a.toString())
var abs=Math.abs
var cos=Math.cos
var sin=Math.sin
var w=window.innerWidth
var h =window.innerHeight
w=w-w%8;//unroll factor
var halfantiw=w*0.0625;
var halfantih=h*0.0625;
var h8=h*8
var w8=w*8;
var canvas3=document.getElementById('c');
var context=canvas3.getContext("2d");
canvas3.width=window.innerWidth;
canvas3.height=window.innerHeight;
const size=w*h*4
var elsize=w*h;elsize+=(4-(elsize%4))
var wint=[];
for(i=0;i<30;i++){wint[i]=Uint32Array(ArrayBuffer(elsize));}
var frame = 0;
var i,preycache;
var rs=Float64Array(ArrayBuffer(64));
var ns=Float64Array(ArrayBuffer(64));
var temps=Int32Array(ArrayBuffer(32))
var lvars=Int32Array(ArrayBuffer(32))
var fcos=Float64Array(ArrayBuffer(8*30));
var fsin=Float64Array(ArrayBuffer(8*30));
var preyfsin1cos=Float64Array(ArrayBuffer(h8))
var preyfsin2cos=Float64Array(ArrayBuffer(h8))
var preyfsin3cos=Float64Array(ArrayBuffer(h8))
var preyfsin1sin=Float64Array(ArrayBuffer(h8))
var preyfsin2sin=Float64Array(ArrayBuffer(h8))
var preyfsin3sin=Float64Array(ArrayBuffer(h8))
var prexs1cos=Float64Array(ArrayBuffer(w8))
var prexs2cos=Float64Array(ArrayBuffer(w8))
var prexs3cos=Float64Array(ArrayBuffer(w8))
var hprecos=Float64Array(ArrayBuffer(w8))
var hpresin=Float64Array(ArrayBuffer(w8))
var prodxf1=Array(h)
var prodxs1=Array(h)
for( i=0;i<h;i++){
prodxf1[i]=Float64Array(ArrayBuffer(w8));
prodxs1[i]=Float64Array(ArrayBuffer(w8));
}
var p,p2,p3,p4,p5,p6,i,co
var pc1,pc2,pc3,pc4,pc5,pc6
var ec1,ec2,ec3;
for( i=0;i<h;i++){
p=prodxf1[i];
p4=prodxs1[i]
pc1=preyfsin1cos[i];
pc2=preyfsin2cos[i];
pc3=preyfsin3cos[i];
pc4=preyfsin1sin[i];
pc5=preyfsin2sin[i];
pc6=preyfsin3sin[i];
for(co=0;co<w;co++){
ec1=prexs1cos[co]
ec2=prexs2cos[co]
ec3=prexs3cos[co]
p[co]=pc1*ec1+pc2*ec2+pc3*ec3+hprecos[co];
p4[co]=pc4*ec1+pc5*ec2+pc6*ec3+hpresin[co];;}
}
function redraw(){
var xf1,xs1,y=lvars[0],x=lvars[1],i=lvars[2],intload=wint[frame],xfracos=lvars[3]=fcos[frame],xfrasin=lvars[4]=fsin[frame];
var r1=rs[0],r2=rs[1],r3=rs[2],r4=rs[3],r5=rs[4],r6=rs[5],r7=rs[6],r8=rs[7];
var n1=ns[0],n2=ns[1],n3=ns[2],n4=ns[3],n5=ns[4],n6=ns[5],n7=ns[6],n8=ns[7];
var temp1=temps[0],temp2=temps[1],temp3=temps[2],temp4=temps[3],temp5=temps[4],temp6=temps[5],temp7=temps[6],temp8=temps[7];
681ms
<html><head><style>html,body{width:100%;height:100%;margin:0px;}
</style></head><body><canvas id='c' ></canvas></body>
<script>//701ms current
var inittime=Date.now();var starttime=inittime;
function addtm(str){document.title+=Date.now()-starttime+str;starttime=Date.now()}
function settm(str){document.title=Date.now()-starttime+str;starttime=Date.now()}
function dump(a)document.writeln(a.toString())
var abs=Math.abs
var cos=Math.cos
var sin=Math.sin
var w=window.innerWidth
var h =window.innerHeight
w=w-w%8;//unroll factor
var halfantiw=w*0.0625;
var halfantih=h*0.0625;
var h8=h*8
var w8=w*8;
var canvas3=document.getElementById('c');
var context=canvas3.getContext("2d");
canvas3.width=window.innerWidth;
canvas3.height=window.innerHeight;
const size=w*h*4
var elsize=w*h;elsize+=(4-(elsize%4))
var wint=[];
for(i=0;i<30;i++){wint[i]=Uint32Array(ArrayBuffer(elsize));}
var frame = 0;
var i,preycache;
var rs=Float64Array(ArrayBuffer(64));
var ns=Float64Array(ArrayBuffer(64));
var temps=Int32Array(ArrayBuffer(64))
var lvars=Int32Array(ArrayBuffer(32))
var fcos=Float64Array(ArrayBuffer(8*30));
var fsin=Float64Array(ArrayBuffer(8*30));
var preyfsin1cos=Float64Array(ArrayBuffer(h8))
var preyfsin2cos=Float64Array(ArrayBuffer(h8))
var preyfsin3cos=Float64Array(ArrayBuffer(h8))
var preyfsin1sin=Float64Array(ArrayBuffer(h8))
var preyfsin2sin=Float64Array(ArrayBuffer(h8))
var preyfsin3sin=Float64Array(ArrayBuffer(h8))
var prexs1cos=Float64Array(ArrayBuffer(w8))
var prexs2cos=Float64Array(ArrayBuffer(w8))
var prexs3cos=Float64Array(ArrayBuffer(w8))
var hprecos=Float64Array(ArrayBuffer(w8))
var hpresin=Float64Array(ArrayBuffer(w8))
var prodxf1=Array(h)
var prodxs1=Array(h)
for( i=0;i<h;i++){
prodxf1[i]=Float64Array(ArrayBuffer(w8));
prodxs1[i]=Float64Array(ArrayBuffer(w8));
}
var p,p2,p3,p4,p5,p6,i,co
var pc1,pc2,pc3,pc4,pc5,pc6
var ec1,ec2,ec3;
for( i=0;i<h;i++){
p=prodxf1[i];
p4=prodxs1[i]
pc1=preyfsin1cos[i];
pc2=preyfsin2cos[i];
pc3=preyfsin3cos[i];
pc4=preyfsin1sin[i];
pc5=preyfsin2sin[i];
pc6=preyfsin3sin[i];
for(co=0;co<w;co++){
ec1=prexs1cos[co]
ec2=prexs2cos[co]
ec3=prexs3cos[co]
p[co]=pc1*ec1+pc2*ec2+pc3*ec3+hprecos[co];
p4[co]=pc4*ec1+pc5*ec2+pc6*ec3+hpresin[co];;}
}
function redraw(){
var xf1,xs1,y=lvars[0],x=lvars[1],i=lvars[2],intload=wint[frame],xfracos=lvars[3]=fcos[frame],xfrasin=lvars[4]=fsin[frame];
var r1=rs[0],r2=rs[1],r3=rs[2],r4=rs[3],r5=rs[4],r6=rs[5],r7=rs[6],r8=rs[7];
var n1=ns[0],n2=ns[1],n3=ns[2],n4=ns[3],n5=ns[4],n6=ns[5],n7=ns[6],n8=ns[7];
var temp1=temps[0],temp2=temps[1],temp3=temps[2],temp4=temps[3],temp5=temps[4],temp6=temps[5],temp7=temps[6],temp8=temps[7],t1=temps[8],t2=temps[9],t3=temps[10],t4=temps[11],t5=temps[12],t6=temps[13],t7=temps[14],t8=temps[15];;
n1=(abs(t1)*0xff)
n2=(abs(t2)*0xff)
n3=(abs(t3)*0xff)
n4=(abs(t4)*0xff)
n5=(abs(t5)*0xff)
n6=(abs(t6)*0xff)
n7=(abs(t7)*0xff)
n8=(abs(t8)*0xff)
intload[i++]=(n1)|(n2<<8)|(n3<<16)|(n4<<24)
intload[i++]=(n5)|(n6<<8)|(n7<<16)|(n8<<24); }}}
for(frame=0;frame<30;frame++)redraw();
var RGB=[],ic,ir,ig,ib;
for(var ic=0;ic<0xff;ic++){
ir=ic-31;ir*=ir>2;ig=ic-81;ig*=ig>8;ig=ig<<8;ib=(ic)<<16
RGB[ic]=(ir|ig|ib)|0xff000000;}
var dispc=[];
window.requestAnimationFrame=window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame;
function dispframe(){if(++frame >= 30)frame = 0;
if(!dispc[frame]){dispc[frame]={width:w,height:h,data:Uint8ClampedArray(ArrayBuffer(size))};
var tv=Uint32Array(dispc[frame].data.buffer);
var intpixels=Uint8Array(wint[frame].buffer);
for(var op=0,c=0;c<elsize;){tv[op++]=RGB[intpixels[c++]];}
delete(wint[frame]);}
context.putImageData(dispc[frame],0,0);
window.requestAnimationFrame(dispframe);}
addtm("ms render");dispframe();
</script></html>
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-10 2:49
666ms
<html><head><style>html,body{width:100%;height:100%;margin:0px;}
</style></head><body><canvas id='c' ></canvas></body>
<script>//676ms current
var inittime=Date.now();var starttime=inittime;
function addtm(str){document.title+=Date.now()-starttime+str;starttime=Date.now()}
function settm(str){document.title=Date.now()-starttime+str;starttime=Date.now()}
function dump(a)document.writeln(a.toString())
var abs=Math.abs
var cos=Math.cos
var sin=Math.sin
var w=window.innerWidth
var h =window.innerHeight
w=w-w%8;//unroll factor
var halfantiw=w*0.0625;
var halfantih=h*0.0625;
var h8=h*8
var w8=w*8;
var canvas3=document.getElementById('c');
var context=canvas3.getContext("2d");
canvas3.width=window.innerWidth;
canvas3.height=window.innerHeight;
const size=w*h*4
var elsize=w*h;elsize+=(4-(elsize%4))
var wint=[];
for(i=0;i<30;i++){wint[i]=Uint32Array(ArrayBuffer(elsize));}
var frame = 0;
var i,preycache;
var rs=Float64Array(ArrayBuffer(128));
var temps=Int32Array(ArrayBuffer(64))
var lvars=Int32Array(ArrayBuffer(32))
var fcos=Float64Array(ArrayBuffer(8*30));
var fsin=Float64Array(ArrayBuffer(8*30));
var preyfsin1cos=Float64Array(ArrayBuffer(h8))
var preyfsin2cos=Float64Array(ArrayBuffer(h8))
var preyfsin3cos=Float64Array(ArrayBuffer(h8))
var preyfsin1sin=Float64Array(ArrayBuffer(h8))
var preyfsin2sin=Float64Array(ArrayBuffer(h8))
var preyfsin3sin=Float64Array(ArrayBuffer(h8))
var prexs1cos=Float64Array(ArrayBuffer(w8))
var prexs2cos=Float64Array(ArrayBuffer(w8))
var prexs3cos=Float64Array(ArrayBuffer(w8))
var hprecos=Float64Array(ArrayBuffer(w8))
var hpresin=Float64Array(ArrayBuffer(w8))
var prodxf1=Array(h)
var prodxs1=Array(h)
for( i=0;i<h;i++){
prodxf1[i]=Float64Array(ArrayBuffer(w8));
prodxs1[i]=Float64Array(ArrayBuffer(w8));
}
function spfl(){
var p,p2,p3,p4,p5,p6,i,co
var pc1,pc2,pc3,pc4,pc5,pc6
var ec1,ec2,ec3;
for( i=0;i<h;i++){
p=prodxf1[i];
p4=prodxs1[i]
pc1=preyfsin1cos[i];
pc2=preyfsin2cos[i];
pc3=preyfsin3cos[i];
pc4=preyfsin1sin[i];
pc5=preyfsin2sin[i];
pc6=preyfsin3sin[i];
for(co=0;co<w;co++){
ec1=prexs1cos[co]
ec2=prexs2cos[co]
ec3=prexs3cos[co]
p[co]=pc1*ec1+pc2*ec2+pc3*ec3+hprecos[co];
p4[co]=pc4*ec1+pc5*ec2+pc6*ec3+hpresin[co];}
}}spfl();
function redraw(){
var xf1,xs1,y=lvars[0],x=lvars[1],i=lvars[2],intload=wint[frame],xfracos=lvars[3]=fcos[frame],xfrasin=lvars[4]=fsin[frame];
var r1=rs[0],r2=rs[1],r3=rs[2],r4=rs[3],r5=rs[4],r6=rs[5],r7=rs[6],r8=rs[7];
var n1=rs[8],n2=rs[9],n3=rs[10],n4=rs[11],n5=rs[12],n6=rs[13],n7=rs[14],n8=rs[15];
var temp1=temps[0],temp2=temps[1],temp3=temps[2],temp4=temps[3],temp5=temps[4],temp6=temps[5],temp7=temps[6],temp8=temps[7],t1=temps[8],t2=temps[9],t3=temps[10],t4=temps[11],t5=temps[12],t6=temps[13],t7=temps[14],t8=temps[15];;
var RGB=[],ic,ir,ig,ib;
for(var ic=0;ic<0xff;ic++){
ir=ic-31;ir*=ir>2;ig=ic-81;ig*=ig>8;ig=ig<<8;ib=(ic)<<16
RGB[ic]=ir|ig|ib|0xff000000;}
var dispc=[];
661ms merge spfl+redraw
<html><head><style>html,body{width:100%;height:100%;margin:0px;}
</style></head><body><canvas id='c' ></canvas></body>
<script>//663ms current
var inittime=Date.now();var starttime=inittime;
function addtm(str){document.title+=Date.now()-starttime+str;starttime=Date.now()}
function settm(str){document.title=Date.now()-starttime+str;starttime=Date.now()}
function dump(a)document.writeln(a.toString())
var abs=Math.abs
var cos=Math.cos
var sin=Math.sin
var w=window.innerWidth
var h =window.innerHeight
w=w-w%8;//unroll factor
var h8=h*8
var w8=w*8;
var canvas3=document.getElementById('c');
var context=canvas3.getContext("2d");
canvas3.width=window.innerWidth;
canvas3.height=window.innerHeight;
const size=w*h*4
var elsize=w*h;elsize+=(4-(elsize%4))
var wint=[];
for(i=0;i<30;i++){wint[i]=Uint32Array(ArrayBuffer(elsize));}
var frame = 0;
var i,preycache;
var locvar=Float64Array(ArrayBuffer(128));
var fcos=Float64Array(ArrayBuffer(8*30));
var fsin=Float64Array(ArrayBuffer(8*30));
var preyfsin1cos=Float64Array(ArrayBuffer(h8))
var preyfsin2cos=Float64Array(ArrayBuffer(h8))
var preyfsin3cos=Float64Array(ArrayBuffer(h8))
var preyfsin1sin=Float64Array(ArrayBuffer(h8))
var preyfsin2sin=Float64Array(ArrayBuffer(h8))
var preyfsin3sin=Float64Array(ArrayBuffer(h8))
var prexs1cos=Float64Array(ArrayBuffer(w8))
var prexs2cos=Float64Array(ArrayBuffer(w8))
var prexs3cos=Float64Array(ArrayBuffer(w8))
var hprecos=Float64Array(ArrayBuffer(w8))
var hpresin=Float64Array(ArrayBuffer(w8))
function prexfill(){var preycache=locvar[0];
var halfantiw=w*0.0625;
for(i=0;i<w;i++){
preycache=i*0.125 - halfantiw
hpresin[i]=sin(preycache)*0.5
hprecos[i]=cos(preycache)*0.5
prexs1cos[i]=cos(preycache*0.9009688679024191)
prexs2cos[i]=cos(preycache*0.6234898018587336)
prexs3cos[i]=cos(preycache*0.22252093395631445)}}
prexfill()
var rs=Float64Array(ArrayBuffer(128));
var temps=Int32Array(ArrayBuffer(64))
var lvars=Int32Array(ArrayBuffer(32))
var prodxf1=Array(h)
var prodxs1=Array(h)
for( i=0;i<h;i++){
prodxf1[i]=Float64Array(ArrayBuffer(w8));
prodxs1[i]=Float64Array(ArrayBuffer(w8));
}
function redraw(){
var p,p2,p3,p4,p5,p6,i,co
var pc1,pc2,pc3,pc4,pc5,pc6
var ec1,ec2,ec3;
for( i=0;i<h;i++){
p=prodxf1[i];
p4=prodxs1[i]
pc1=preyfsin1cos[i];
pc2=preyfsin2cos[i];
pc3=preyfsin3cos[i];
pc4=preyfsin1sin[i];
pc5=preyfsin2sin[i];
pc6=preyfsin3sin[i];
for(co=0;co<w;co++){
ec1=prexs1cos[co]
ec2=prexs2cos[co]
ec3=prexs3cos[co]
p[co]=pc1*ec1+pc2*ec2+pc3*ec3+hprecos[co];
p4[co]=pc4*ec1+pc5*ec2+pc6*ec3+hpresin[co];}
}
var r1=rs[0],r2=rs[1],r3=rs[2],r4=rs[3],r5=rs[4],r6=rs[5],r7=rs[6],r8=rs[7];
var n1=rs[8],n2=rs[9],n3=rs[10],n4=rs[11],n5=rs[12],n6=rs[13],n7=rs[14],n8=rs[15];
var temp1=temps[0],temp2=temps[1],temp3=temps[2],temp4=temps[3],temp5=temps[4],temp6=temps[5],temp7=temps[6],temp8=temps[7],t1=temps[8],t2=temps[9],t3=temps[10],t4=temps[11],t5=temps[12],t6=temps[13],t7=temps[14],t8=temps[15];;
var xf1,xs1,y=lvars[0],x=lvars[1],i=lvars[2];
for(var frame=0;frame<30;frame++){
var intload=wint[frame],xfracos=lvars[3]=fcos[frame],xfrasin=lvars[4]=fsin[frame];
C++ is a good language. It is not a perfect language because it inherits from C. C is a flawed language where many things are left undefined. C is an ancient artifact that serves no purpose outside of the domain of kernel design. Because of the improvements made upon C to form C++, beginning programmers and veteran programmers alike may be led astray, thinking that modern C usage is a good idea. It is a mistake to believe the success of C++ justifies the continued use and popularity of C. Just because C++ is successful does not mean the language it has inherited from is of high quality.
So FrozenVoid and Cudderspace, it's been 7 months, how was the wedding?
Name:
Anonymous2013-08-31 19:43
Ruitomo? Killing curse that's not unique to you is good enough.
Name:
Anonymous2013-08-31 21:14
How are little girls disgusting? If that's not it, how is a grown man masturbating to little girls any more disgusting than another grown man masturbating to women?