GCC 4.7.2 overhead of auto lambda expression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

It's been a little while, but I seem to recall that static variables
can be declared in the scope of a class instance method?

Next question, I am declaring a lambda function in the scope of a
method to leverage a read-from-channel-to-variable pattern: the read
is the same, agnostic to the channel and variable.

I am finding that this is somewhat slow, so a couple of thoughts are:
is the lambda even appropriate? I declare it as an auto for starters,
and it resolves every time the function happens.

Can that auto lambda variable be static? Or possibly, I don't think
the problem domain is that dynamic that a handful of helper member
functions wouldn't also do the same job, probably faster too without
the overhead of declaring the lambda autos.

Thoughts?

Thank you...

Regards,

Michael Powell




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux