タグ

c++に関するbellbindのブックマーク (6)

  • Why are elementwise additions much faster in separate loops than in a combined loop?

    Suppose a1, b1, c1, and d1 point to heap memory, and my numerical code has the following core loop. const int n = 100000; for (int j = 0; j < n; j++) { a1[j] += b1[j]; c1[j] += d1[j]; } This loop is executed 10,000 times via another outer for loop. To speed it up, I changed the code to: for (int j = 0; j < n; j++) { a1[j] += b1[j]; } for (int j = 0; j < n; j++) { c1[j] += d1[j]; } Compiled on Micr

    Why are elementwise additions much faster in separate loops than in a combined loop?
    bellbind
    bellbind 2011/12/20
    ループを分割したほうが速いのはなぜか。アラインメントとキャッシュメモリの性質とのこと。
  • Bjarne Stroustrup、Conceptと未来を語る

    センスとフィーリングで大胆な意訳を試みた。Danny Kalevがやたらとウザい奴に成り下がっていたり、Bjarne Stroustrupがコミカルなまでにジジイ臭いのは仕様。ただ、DKの言い回しは、ちょっとやり過ぎたかも知れない。実際原文を読んでいると、これぐらいムカつく言い回しなのだが。 Page 1: Concepts: Disappointment Without Defeat Danny Kalev 今回のconceptの失敗についてどう受け止めてますか。今回の事件をどう思いますか。これは、あるいは、将来的に新機能を提案する妨げになると思いますか。 Bjarne Stroustrup C++0xにconceptを入れないと決定したことについてかね。ワシとしては、conceptが失敗したとは思っておらんよ。今回の問題は、個人的にはユーザビリティの問題だと思っておるんだが、まあ、せい

  • 「C++ は難しいから」と言う定説 - Cube Lilac

    雑記. C++ は難しいから Java から始めた方が・・・ ここ最近(と言うか以前からずっとですが),上記のようなアドバイスを見かける機会が多かったせいか「C++ の何を指して(Java と比べて)難しいと言っているのだろう?」と言う事を単純に疑問に思うようになりました.Java 自体はほとんど使ったことないのですが*1,感想としては「どちらも大して変わらない」と言うものだったので余計に気になっています. 以下,現状で私が「これが要因かなぁ」と思っている事を列挙してみます. C++ には XXX と言うクラス/関数がない 可能性として一番高いのはこれかなぁと思っています.C++ の標準ライブラリは必要最低限のものしか(必要最低限のものさえも?)用意されていないので,他の言語と比べてライブラリの貧弱さは目立ちます.Boost を含めればかなりマシになりますが,それでもキツいかなと言う印象を

    「C++ は難しいから」と言う定説 - Cube Lilac
    bellbind
    bellbind 2009/07/09
    易しいとか難しいとかいうのは実行までに必要な概念についてで、その大半は言語そのもののじゃなくて構成や配置にあるのじゃないだろうか。
  • 三门峡椅靖文化传播有限公司

    bellbind
    bellbind 2009/04/14
    iPhone風L&Fなツールキット。GPLと商用のデュアルライセンス
  • Paste number 74068: toy LLVM LISP

    /* A Trivial LLVM LISP * Copyright (C) 2008-2009 David Robillard <dave@drobilla.net> * * Parts from the Kaleidoscope tutorial <http://llvm.org/docs/tutorial/> * by Chris Lattner and Erick Tryzelaar * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the Li

    bellbind
    bellbind 2009/02/20
    文字列*パーザー→S式*パーザー→AST(変数、整数、条件分岐、関数、呼出)*CodeGen→LLVMコードのコンパイラ
  • Page Redirection - GNU Project

    This page has been incorporated into another. If you are not redirected automatically, click here. For questions related to the use of GCC, please consult these web pages and the GCC manuals. If that fails, the gcc-help@gcc.gnu.org mailing list might help. Comments on these web pages and the development of GCC are welcome on our developer list at gcc@gcc.gnu.org. All of our lists have public archi

    bellbind
    bellbind 2008/10/23
    g++ -std=c++0x の状況
  • 1