I think the strings can just be lowercase in the enum, there's no
reason really that they have to be upper case.

The current code isn't necessarily inefficient though, just more lines
than necessary. OSL can do constant folding because the strings are
known at compile time, and in fact string comparison in OSL is very
cheap because it uses interned strings, so it's just a pointer
comparison.

On Sun, Jun 23, 2013 at 8:47 PM, Sergey Sharybin <[email protected]> wrote:
> Ah, another idea would be to convert space to lower space when doing
> blender->cycles shader tree conversion.
>
> Anyway, there're lots of ways to go, would leave making final decision up
> to you :)
>
> Catch you next time!
>
>
> On Mon, Jun 24, 2013 at 12:44 AM, Thomas Dinges <[email protected]> wrote:
>
>> Hey Sergey,
>> thanks for the suggestion, I am not happy with this yet either.
>> Will check on a better solution. :)
>>
>> Thanks,
>> Thomas
>>
>> Am 23.06.2013 20:40, schrieb Sergey Sharybin:
>> > Hi,
>> >
>> > Just quick brainstorm idea: instead of comparing the whole string to
>> > convert it to lower-case, you could do comparison of the first letter
>> only
>> > and assign only that one? Would give some %% of boost :)
>> >
>> >
>> > On Sun, Jun 23, 2013 at 11:51 PM, Thomas Dinges <[email protected]>
>> wrote:
>> >
>> >> Revision: 57670
>> >>
>> >>
>> http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57670
>> >> Author:   dingto
>> >> Date:     2013-06-23 17:51:08 +0000 (Sun, 23 Jun 2013)
>> >> Log Message:
>> >> -----------
>> >> Cycles / Vector Transform Node:
>> >> * Implementation of Vector Transform Node into Cycles.
>> >> * OSL backend is done, SVM needs the matrices still.
>> >>
>> --
>> Thomas Dinges
>> Blender Developer, Artist and Musician
>>
>> www.dingto.org
>>
>> _______________________________________________
>> Bf-committers mailing list
>> [email protected]
>> http://lists.blender.org/mailman/listinfo/bf-committers
>>
>
>
>
> --
> With best regards, Sergey Sharybin
> _______________________________________________
> Bf-committers mailing list
> [email protected]
> http://lists.blender.org/mailman/listinfo/bf-committers
_______________________________________________
Bf-committers mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-committers

Reply via email to