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()
A blog from a software developer who didn't get any formal training or education at all. :P
Sunday, February 9, 2014
Search Speed: Records vs. Full Text Search
검색 속도: 레코드 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:
- node.js says one of the biggest strength lies in asynchronous callback
- Qt is designed to be asynchronous
- Boost has boost::async
- Which of the two, node.js or C++, would have more libraries?
- Which will be faster, JIT or static compilation?
Qt+Boost는 무적입니다
요즘 node.js가 뜬다길래 node.js를 끼적거려봤습니다.
그러다가 문득 생각이 든게……
- node.js는 비동기식이라는게 가장 큰 장점이잖아?
- Qt도 비동기인데?
- Boost도 boost::async가 있지..??
- node.js하고 C++하고 어느게 라이브러리가 더 많을까?
- JIT하고 static compilation하고 어느게 더 수행속도가 빠를까?
……어?!
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.
Thursday, October 31, 2013
XMLlucination: 의사(pseudo) XML 해석기
XMLlucination은 XML 문서에 대한 의사(pseudo) 해석기입니다. XMLlucination은 노드를 찾고, 속성이나 노드 안의 raw text를 읽을 수 있습니다. 예. raw text입니다 - 텍스트 엘리먼트같은 것만 선택적으로 뽑아내는게 아니라, 노드 안에 있는 텍스트 전체를 뽑아내는 무식한 녀석입니다(……).
이 코드의 라이선스는 Lazarus의 라이선스 조건을 따릅니다. 기본적으로는 LGPL이나, 추가적으로 static link를 허용합니다.
간단한 사용법은 다음과 같습니다:
- 파일을 PChar 배열이나 String에 읽어들입니다.
- LocateNodePair()를 사용하여 TNodePair를 받습니다.
- GetAttributeValue()에 TNodePair.Open를 적용하여 속성값을 얻어냅니다.
- GetNodeValue()에 TNodePair 객체를 적용하면 node 안의 text를 얻을 수 있습니다.
아무쪼록 도움이 되셨으면 좋겠습니다. 즐거운 코딩 되세요!
2014년 4월 21일 추가:2013년 10월 31일에 등록된 원본 포스팅에서는 본 포스팅에 모든 소스코드를 공개하였으나,지금은 소스코드를 Google Drive의 파일 링크로 대체합니다. Uploading 당시 Tumblr의 오류로 추정되는 이상행위로 인해 소스코드가 여러모로 사용 불가능하게 등록되어 있더군요(따옴표의 유니코드 대체, ‘보다 작다’ 부등호 사인의 삭제 등).
이 문장을 클릭하시면 파일을 다운로드하실 수 있습니다.