Posts Tagged bytecode

Why Static Is Slow

Tags: , , , , ,

Using static variables and functions is slow. That was the conclusion of the previous article on statics, but the subject is actually more nuanced than that. Today we’ll explore static more in-depth and find out just why it is so slow.

Read the rest of this article »

25 Comments

Introduction to AGAL: Part 3

Tags: , , , , , ,

Continuing from last time, in today’s article we’ll discuss the process of building and using basic shaders. This forms the basis of all Flash 11 Stage3D engines, so you’ll be learning how hardware-accelerated 3D shaders are built from the ground up.

Read the rest of this article »

9 Comments

Introduction to AGAL: Part 2

Tags: , , , ,

To continue the series on Flash 11 Stage3D shader programming, this week we’ll take a look at the data types your shader has available and finally dive into some actual AGAL assembly syntax.

Read the rest of this article »

9 Comments

Default Arguments

Tags: , , , , ,

I’ve talked about var args, the arguments keyword, and even the length of a function that has default arguments, but I’ve never written an article all about default arguments… until today.

Read the rest of this article »

11 Comments

Variable Ordering

Tags: , , , ,

I recently perused the AVM2 bytecode overview that Adobe provides and found something strange: they have special instructions for the first few local variables. Getting the first local variables is done by getlocal0, getlocal1, getlocal2, getlocal3, but then a generalized getlocal is used for local variables thereafter. This brought me to think about the performance implications of these specialized instructions. After all, why have them when you already have a generalized one? Read on to see the performance differences and if you can get any speed boost from rearranging your local variables.

Read the rest of this article »

5 Comments