Posts Tagged indexOf

String.charCodeAt Is Really Fast

Tags: , ,

String.charCodeAt is a simple function so you might expect the function call overhead (huge in AS3) to making calling it frequently quite slow. You’d think that there’s no way an charCodeAt-using AS3 function could beat a built-in String function like indexOf. Would you be right? Today’s article examines this special function to see if we might defy conventional wisdom and achieve a performance boost.

Read the rest of this article »

4 Comments

Three Interesting Discoveries

Tags: , , ,

Today’s article is about three totally unrelated discoveries I’ve recently made in AS3. These answer three questions I’ve recently had. Should you cache the object you’re looping over with a for-each loop as a local variable? Can you clear a Dictionary or Object with a for-in loop? Is it faster to write your own version of Vector.indexOf? All of these questions are answered in today’s article!

Read the rest of this article »

9 Comments