2009年11月1日 星期日

The effect of pre compiled header in gcc

每次使用C++ , 為了擺脫漫長無盡的 compilation time. 我不得不看一下 precompiled header..

[pre.h]
#include<tr1/unordered_map>
#include<tr1/unordered_set>
#include<tr1/regex>
#include"iostream"
#include"algorithm"
#include"string"
#include"vector"
#include"fstream"



[main.cpp]
#include"pre.h"
using namespace std;
using namespace tr1;
int main(){
vector<int> v;
string s = "tim";
unordered_map<int,int> um;
cout<<"yes"<<endl;
return 0;
}




只要g++ pre.h 就可以產出 pre.h.gch
以後gcc 會優先使用 pre.h.gch.

[Result of benchmark by time:]

Without precompiled header.
real 0m0.370s
user 0m0.336s
sys 0m0.036s


With precompiled header.
real 0m0.120s
user 0m0.088s
sys 0m0.036s

看來可以省一半以上的時間!  
以後在更大的project 再來測測看

2009年10月18日 星期日

MT,MD,MTD

http://msdn.microsoft.com/zh-tw/library/2kzt1wy3%28VS.80%29.aspx
最近花了很多時間在這個東西上面,MS的產品真是折磨人....

2009年9月30日 星期三

Keroro hotmail

雖然我都不用 hotmail , 但是因為keroro 十週年活動,可以送出

????@kululu.keroro.com

這種很有價值的E mail, 我就趕快去申請了

http://promotion.jp.msn.com/thanks_10years/keroro/

我等不及要趕快給別人看這個email address了!

2009年9月28日 星期一

python tab completion

http://www.razorvine.net/frog/user/irmen/article/2004-11-22/17

http://allsortsofshrink.blogspot.com/2009/08/tab-auto-completion-in-python-shell.html

在一般的python 下,也可以用 tab complete !! 真是熱淚盈眶

2009年8月23日 星期日

就差離校手續了

沒有裡開學校的喜悅

只希望成功嶺的受訓可以幫我減一點體重

2009年2月12日 星期四

Back to 寒訓

中途請假回到實驗室

現在該是回去的時候嚕!!

明天要大單定

看來今天要熬夜了 ( 練樂器熬夜.... )

2009年2月6日 星期五

為了備份

我現在在寫 插入 usb 就立刻比資料備份好的program