3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

pure属性

Last updated at Posted at 2014-09-10

pure属性は、関数へ指定する属性の一つで、共通部分式除去ループ最適化などのコンパイラ最適化へのヒントだそうだ。

関数が返り値以外に副作用を持たず、その返り値も引数とグローバル変数によってのみ決まる場合に、この属性を指定しておくとコンパイラが最適化してくれる。

もし間違えて指定しても単に無視するだけだろうか?

参考

3
2
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?