|Re: [eigen] Comma-initializer is quite expensive with compile-time known constants|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [eigen] Comma-initializer is quite expensive with compile-time known constants
- From: Ola Røer Thorsen <ola@xxxxxxxxxxxxxx>
- Date: Wed, 7 Nov 2018 08:57:30 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silentwings-no.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=S0ILZ/JG/skxnNtTBCrxM+ycHhnYX8fFVUqQdkoOwtE=; b=UpzZx42Lq24St7WXlLsR3KXYxI3iEsIKJen0jeBVOArrx85W5E3Dbo4BGFSK4l/9GH q33vo6nRQt40Ie3VchHzg3S5eYMnfgpFmINFIx4C6f6/r89SngEc9gKh6fdWXsTRNZXV uIOweN6ZkLZJwKG7mXRDsoR+ghepMwe/wMCIG9798ciWiOrkxRvVmfM2rc6kiK0u5afp Vj5xPlqFT3920xq2M7Y822U/xEynA8ONtUQoTzplydQAbNQWFeyQtqAFx1TIsIB1EqMZ oWwTyP5E6hFJ/SlK/rqOvGHeHN7ArBgDzABoehoyEMPB+WE72GZlJ/W5xRT60+Bye7kk nOmw==
GCC sometimes has trouble to fully optimize code inside the main
function -- simply renaming your function will give fully optimized code
(I'm not sure whether that is a known issue or a "feature" of GCC).
Also, once you sufficiently tested your code, you should compile with
`-DNDEBUG` to disable assertions.
Thanks a lot, Christoph! Yeah that makes a big difference - I'll be sure to keep that in mind when playing with the compiler explorer, guess I was too quick in my assumptions this time..