On 27/04/12 17:18, Steven Schveighoffer wrote:
const should not affect code generation *at all*, except for name mangling
(const MyStruct is a different type from MyStruct), and generating an extra
TypeInfo for const MyStruct and const MyStruct[]. Const is purely a compile-time
concept.

This cannot account for an extra 2 seconds. Something else is happening.

Without more of your code, nobody can give a definitive answer except it is not
supposed to affect it.

The code is here: https://github.com/WebDrake/Dregs/

... and the particular file concerned is
https://github.com/WebDrake/Dregs/blob/master/dregs/codetermine.d

You'll see that there are about 8 different functions in there which receive as input an array of type Rating!(UserID, ObjectID, Reputation)[]. These were the inputs I was marking as const.

Reply via email to