タグ

Cに関するgfxのブックマーク (27)

  • 未定義動作により最適化レベルで結果が変わるコード - Qiita


     C++ C++C++C++  
    未定義動作により最適化レベルで結果が変わるコード - Qiita
    gfx
    gfx 2019/09/27
  • お手軽に使える高速なSSE4.2専用文字検索ライブラリ - Cybozu Inside Out | サイボウズエンジニアのブログ


     C/C++mie_string mie_string 使SIMD使  mie_stringCintrinsicSSE4.2使 intrinsic使MIE_STRING_INLINEmie_string.hinclude C/C++使 include gcc/clang-msse42-mavxVisua
    お手軽に使える高速なSSE4.2専用文字検索ライブラリ - Cybozu Inside Out | サイボウズエンジニアのブログ
    gfx
    gfx 2016/08/25
  • Notes on Programming in C - bell labs - pikestyle | /sys/doc/ Documentation archive

    Rob Pike February 21, 1989 Introduction Kernighan and Plauger's The Elements of Programming Style was an important and rightly influential book.  But sometimes I feel its concise rules were taken as a cookbook approach to good style instead of the succinct expression of a philosophy they were meant to be.  If the book claims that variable names should be chosen meaningfully, doesn't it then follow

    gfx
    gfx 2014/10/13
  • Kazuho's Weblog: Making the HTTP server run 20% faster by using qrintf-gcc; a sprintf-optimizing preprocessor / compiler

    Making the HTTP server run 20% faster by using qrintf-gcc; a sprintf-optimizing preprocessor / compiler tl;dr This is an initial release announcement of qrintf, a preprocessor (and qrintf-gcc is the compiler frontend) that optimizes calls to sprintf and snprintf. C programs calling the functions may run faster by using the preprocessor / compiler in place of the standard compiler toolchain. Backgr

    gfx
    gfx 2014/10/07
  • GoのツールチェインのCコンパイラを使う - moriyoshiの日記


    ( GoAdvent Calendar 2013 1224)  Go (5a, 6a, 8a) C (5c, 6c, 8c) Plan 9 (src/pkg/runtime) 使使 (使) GoABIPlan 9Go*1 GoGoC GoG
    GoのツールチェインのCコンパイラを使う - moriyoshiの日記
    gfx
    gfx 2013/12/26
  • 普通のやつらの下を行け: C でバックトレース表示 - bkブログ

    普通のやつらの下を行け: C でバックトレース表示 普通のやつらの下を行けの第2回として、今回は glibc の関数を使って C でバックトレース (スタックトレース) の表示を行ってみます。 バックトレースとは バックトレースとは、大ざっぱに言うと、現在の関数に至るまでの道筋です。たとえば、次の Ruby プログラムを実行すると、 1 / 0 の行で例外が発生して、バックトレースの表示とともにプログラムは異常終了します。 def foo 1 / 0 end def main foo end main この例では main から foo を呼び foo の中の 1 / 0 の部分で例外が発生しています。 % ruby divide-by-zero.rb divide-by-zero.rb:2:in `/': divided by 0 (ZeroDivisionError) from div

  • あなたもできる!C言語でテトリスを40分で作る方法 · DQNEO日記

    デモ ニコニコ動画の伝説の動画 「テトリスを1時間強で作ってみた【実況解説】」という動画をご存知でしょうか? 2009年にニコニコ動画で公開されて話題になった動画です。 インタビュー記事:「テトリスを1時間強で作ってみた」動画の投稿者にインタビュー──「プログラミングの楽しさ伝えたい」 この動画ではテトリスをいちから作ってわずか62分で完成させています。 しかし実はスタート直後はMinGWのインストール、EmEditorのインストールに続いてブロック画像の作成などをしており、プログラミングが始まるのは開始13分のところからです。 さらに次の10分は「空のウィンドウ」を作るために時間を使っており、実質的にテトリスのプログラミングが始まるのは動画23分のところからです。 つまり、実質的に40分のプログラミングでテトリスを完成させています。 で、動画を見ながら同じようにやれば誰でもテトリスを作れ

    あなたもできる!C言語でテトリスを40分で作る方法 · DQNEO日記
    gfx
    gfx 2012/11/12
  • Success is a Journey, not a Destination: 全てのCプログラマが未定義な振る舞いについて知っておくべきこと #1/3


    [What Every C Programmer Should Know About Undefined Behavior #1/3 ] LLVMSIGTRAP調(X86) Clang "ud2" "ud2" __builtin_trap()[: #UD#UD使使LLVMud2LLVM] C
    gfx
    gfx 2012/02/01
  • Should volatile acquire atomicity and thread visibility semantics?

    Should volatile Acquire Atomicity and Thread Visibility Semantics? Traditionally, the semantics of C's and C++'s volatile keyword have been unclear. In particular, these languages state that operations are "evaluated strictly according to the rules of the abstract machine" (C99, 6.7.3-6) But, at least in the pthread context, this has generally not been interpreted to apply to inter-thread visibili

  • ポインタ宣言の*記号、左寄せ派? 右寄せ派?

    C/C++でポインタ変数を宣言するときの*記号をint* a;のように左寄せで書くか、int *a;のように右寄せで書くか。 右寄せで書く場合、「Cでは宣言と使用の文法を一致させる」という規則から考えれば素直に解釈できるという話。

    ポインタ宣言の*記号、左寄せ派? 右寄せ派?
    gfx
    gfx 2011/10/12
  • Deep C

    Programming is hard. Programming correct C and C++ is particularly hard. Indeed, both in C and certainly in C++, it is uncommon to see a screenful containing only well defined and conforming code.Why do professional programmers write code like this? Because most programmers do not have a deep understanding of the language they are using.While they sometimes know that certain things are undefined o

    Deep C
    gfx
    gfx 2011/10/11
  • PHP5.3.7のcrypt関数のバグはこうして生まれた


    PHP5.3.7crypt(Bug #55439)crypttwitter  PHPPHP5.3.7RC4PHP5.3.7RC5RC5PHP5.3.7Release Candidate php_md5_crypt_r
    PHP5.3.7のcrypt関数のバグはこうして生まれた
    gfx
    gfx 2011/08/24
    バグ混入の経緯が興味深い。
  • Cyclone (programming language) - Wikipedia

    The Cyclone programming language was intended to be a safe dialect of the C language. It avoids buffer overflows and other vulnerabilities that are possible in C programs by design, without losing the power and convenience of C as a tool for system programming. It is no longer supported by its original developers, with the reference tooling not supporting 64-bit platforms. The Rust language is men

    gfx
    gfx 2011/07/04
  • 卜部昌平のあまりreblogしないtumblr


     C CJavaJavaJavaJVM1CCJava10 !shootout.alioth.debian.orgJavaCJava C使
    卜部昌平のあまりreblogしないtumblr
  • OpenMPなコンパイラ,MercuriumとNanos4の導入 - 俺とお前とlaysakura


     ! @laysakura !C Borland C Compiler  gcc  Visual C++ cl gcc 使  Mercurium    ( Mercurium  Nanos4 使 Nanos4 ) Mercurium  Mercuri
    OpenMPなコンパイラ,MercuriumとNanos4の導入 - 俺とお前とlaysakura
    gfx
    gfx 2011/04/08
  • C言語の代表的なウェブリソース10選 - YAMDAS現更新履歴

    Top 10 C Language resources that will turn you into a better programmer - C and C++ Programming Resources 今更 C 言語かと言われそうだが、Linux カーネルだって、我々が利用している LL 言語の多くだってこの言語で書かれているのである。ワタシ自身は未だどの言語よりCを愛している。 以下に C 言語に関してウェブに公開されている代表的なリソースを挙げていく。さすがに更新が長らく止まっているものが多いが、それでも有用な情報源には違いない。ネタ元は Hacker News。 C Programming Notes Programming in C - UNIX System Calls and Subroutines using C. C Lesson by Chris Sawtell

    C言語の代表的なウェブリソース10選 - YAMDAS現更新履歴
    gfx
    gfx 2011/02/21
  • Cのコールバック関数をC++のメンバ関数にバインディングする方法 - kazuhoのメモ置き場

    たとえば libevent のような C 言語でかかれたイベント駆動型のライブラリを C++ から使っていると、C++ のメンバ関数をコールバックとしてセットできたらうれしいことが多いですよね。以下のようにすればできます。 たとえば、コールバック関数をセットする関数の型が、 void set_foo_callback(void (*)(void* cb_arg), void* cb_arg); なら、以下のようにクラスとメンバ関数を引数にとるテンプレート関数を定義し、 template <typename T, void (T::*FUNC)()> void to_foo_callback(void* cb_arg) { T* obj = reinterpret_cast<T*>(cb_arg); (obj->*FUNC)(); }以下のように受け渡せばいい。 class K { publ

    Cのコールバック関数をC++のメンバ関数にバインディングする方法 - kazuhoのメモ置き場
    gfx
    gfx 2011/01/27
  • glibcの実装変更にて引き起こしたFlash不具合 | gihyo.jp


    LinuxLWN.netFedoraFlashmp3LinuxFlash使glibcmemcpymemcpyFlash Playerglibc64CPUmemcpy
    glibcの実装変更にて引き起こしたFlash不具合 | gihyo.jp
    gfx
    gfx 2010/12/31
    cppマクロで切り替えられるようにすればいいのかねえ。
  • C言語 Super Technique 講座


    使 使...       
  • NAKAMURA Minoru's Diary (2010年9月)

    2002 | 10 | 11 | 12 2003 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 2004 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 2005 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 2006 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 2007 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 2008 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 2009 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 1

    gfx
    gfx 2010/09/19