Pages

Sunday, February 9, 2014

QByteArray::indexOf()

Qt 5.2.1에서 QByteArray::indexOf()가 내가 만든 char* 기반의 Boyer-Moore-Horspool full string search와 거의 동일한 속도를 내고 있다. Qt쪽의 소스코드가 동일한 걸로 봐서 GCC가 4.8.2로 업데이트되면서 나온 최적화 결과인 듯.

Search Speed: Records vs. Full Text Search

If the data can be divided into records, hash table based lookup is more than twice faster than Boyer-Moor-Horspool style full string search.

Example: QMap/QHash vs. QString::indexOf()

검색 속도: 레코드 vs. 텍스트 전체 검색

만일 레코드 단위로 분리가 가능하다면, 해시 테이블 기반의 lookup function이 Boyer-Moore-Horspool 스타일의 full string search보다 2배 이상 빠르다.

예: QMap/QHash vs. QString::indexOf()

Sunday, January 19, 2014

Qt+Boost=invincible

Nowadays I was trying node.js (actually, following tutorials).
During the following, some thoughts popped up:

  1. node.js says one of the biggest strength lies in asynchronous callback
  2. Qt is designed to be asynchronous
  3. Boost has boost::async
Now, the thoughts spread more……
  1. Which of the two, node.js or C++, would have more libraries?
  2. Which will be faster, JIT or static compilation?
My conclusion: why do I try node.js, though I can do it everything with Qt + Boost?

Qt+Boost는 무적입니다

요즘 node.js가 뜬다길래 node.js를 끼적거려봤습니다.
그러다가 문득 생각이 든게……

  1. node.js는 비동기식이라는게 가장 큰 장점이잖아?
  2. Qt도 비동기인데?
  3. Boost도 boost::async가 있지..??
이쯤해서 생각 전개!
  1. node.js하고 C++하고 어느게 라이브러리가 더 많을까?
  2. JIT하고 static compilation하고 어느게 더 수행속도가 빠를까?
결론: Qt + Boost로 다 되는데 왜 node.js를 하려는 거지?

……어?!

Monday, December 16, 2013

Time to Go Back to the School

Time to be back to the school. No, not as a student, but as a mentor. I have a debt to pay back to.

학교로 돌아갈 시간

학교로 돌아갈 시간이다. 아니, 학생으로서가 아니라 멘토로써. 난 되갚아야 할 빚이 있거든.