Posts Tagged attribute

C++ For C# Developers: Part 31 – Deconstructing and Attributes

Tags: , , , ,

Both languages have both deconstructing (var (x, y) = vec;) and attributes ([MyAttribute]). C++ differs from C# in several ways, so today we’ll take a look at those differences and learn how to make use of these language features.

Read the rest of this article »

4 Comments

Easily “Compile Out” Function Calls

Tags: , ,

Taking another break from the iterator series, this week we’ll take a look at an exciting .NET feature that can easily and cleanly remove the calls to a function throughout the whole code base. Unity uses this for Debug.Assert and you can use it for all sorts of functions, too. Wouldn’t it be nice if we could strip out all the debug functions from the production build of our game but leave them in during development? Read on to learn how!

Read the rest of this article »

4 Comments

XML E4X Operators vs. XML Class Methods

Tags: , , , ,

We know that the XML E4X operators are an 10x slower than plain Object, but how slow are they compared to the XML class’ methods like elements() and attributes? Today’s article finds that out.

Read the rest of this article »

5 Comments

XML Operator Speed

Tags: , , , , , ,

AS3 has always had great support for XML built right into the language, but how fast is it? Today’s article compares the performance of operators that work on XML objects like .@x, .x, ..x, and ["x"] against their equivalents in plain Object instances and typed class instances. Just how slow are the XML operators? Read on to find out.

Read the rest of this article »

4 Comments