サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
体力トレーニング
221.112.61.214/~kzk
C言語において実行時間を測定する為の方法はいくつかある。clock, gettimeofday, getrusage, timesを利用する方法である。ここではこれらの方法について検証してみる。これは2005/12/30時点での情報であり、古い亊が考えられるので注意して頂きたい。さらに、内容のほとんどはmanを移しただけなので、正確な情報を得るためにそれぞれの関数のmanを見ることを強く推奨する。 System: Linux 2.6.12 glibc: glibc 2.3.5-1ubuntu12 clockを使用する方法 clockはANSI Cで定義されている。返り値の型はclock_tとなっており、その精度はCPU時間で有る。秒単位での値を得る為には、CLOCKS_PER_SECで割る必要が有る。POSIXではCLOCKS_PER_SECが1000000である亊を要求している。 #
ubuntu% uname -a Linux ubuntu 2.6.12-10-386 #1 Sat Mar 11 16:13:17 UTC 2006 i686 GNU/Linux ubuntu% valgrind --version valgrind-3.0.1 (0) 目次 Valgrindに含まれるツール Memcheck: メモリエラーを検出する(default) Cachegrind: キャッシュミスを検出する Massif: ヒーププロファイラを使う まとめ valgrindの使い方とエラーメッセージを整理してみた。「valgrind --leak-check=full command」というコマンドラインをよく用いる。これによりメモリ周りのバグを検出出来る。 --tool=cachegrindではプログラム実行時のキャッシュミス率を測定する事が出来る。cg_annotateを
parsecのお勉強をする。今日のYet Another Perl Conferenceで聞いたんだけど、ある程度マスターすれば15分でPerlのparserが書けるらしいよ。すげえ!という事で、やってみますかぃのぉ。 parsec - a free monadic parser combinator library Parsec, a fast combinator parser Parsec, 高速なコンビネーターパーサ Write Yourself a Scheme in 48 Hours Library Reference: Index of /ghc/docs/6.4/html/libraries/parsec Parsec: Direct Style Monadic Parser Combinators for the Real World , Daan Leijen and
2006/03/09 Kazuki Ohta Introduction This is a clone program of SL(1), 'Ultimet Joke Command' by Masashi Toyoda, but written in Haskell. So the name is Ha-SL! Author Kazuki Ohta Download This is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License Source HaSL.hs Build
主にUNIX系プログラミングに関する話題を扱うページです。Welcome to my personal space on the web. I'm Kazuki Ohta (太田一樹), a first-year master student of Ishikawa Laboratory, Graduate School of Information Science and Technology at The University of Tokyo. I was born in Higashi-Osaka, at 1985/04/21. My current interest is Distributed/Parallel Systems for Data Intensive Computing, and System Programming (especially multi-threa
このページを最初にブックマークしてみませんか?
『Mover - kzk9.net』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く