오래전 Matrix 연산을 위해 라이브러리를 찾던 중 알게된 Armadillo 를 오늘에서야 테스트를 해 보았다. Armadillo는 사이트에 게시된 속도테스트 결과에 의하면 IT++ 와 NEWMAT 라이브러리와 비교해서 월등히 속도가 빠르다. 그래서 OpenCV 의 Matrix 연산과 비교해 보았다. OpenCV Library 는 2.2 버전을 사용하고 컴파일러는 Visual C++ 2010 버전을 사용하였다.
아래는 테스트에 사용한 코드이다.
결과는 의외로 OpenCV 가 더 빠른 결과가 나왔다.
아래는 위 코드를 열번 반복했을 때 처리 시간이다.
OpenCV Matrix : 1.158083ms
Armadillo Matrix : 0.946997ms
OpenCV Matrix : 1.125553ms
Armadillo Matrix : 0.977720ms
OpenCV Matrix : 0.932178ms
Armadillo Matrix : 1.334109ms
OpenCV Matrix : 1.124107ms
Armadillo Matrix : 1.342423ms
OpenCV Matrix : 0.794104ms
Armadillo Matrix : 0.934708ms
OpenCV Matrix : 1.126637ms
Armadillo Matrix : 1.333025ms
OpenCV Matrix : 1.125553ms
Armadillo Matrix : 1.332302ms
OpenCV Matrix : 1.120854ms
Armadillo Matrix : 1.331218ms
OpenCV Matrix : 1.124107ms
Armadillo Matrix : 1.337362ms
OpenCV Matrix : 1.121216ms
Armadillo Matrix : 1.332302ms
실제로 Armadillo 가 가장 빠른지 다른 라이브러리와도 테스트를 해 보아야겠다.
'Dev Story' 카테고리의 다른 글
SQLite 3.7.5.0 Library (정적/동적) for C++ Builder and Visual C++ (0) | 2011.02.08 |
---|---|
SQLite 3.7.5 Release (0) | 2011.02.07 |
Firebird는 Transaction 처리가 기본!! (0) | 2011.01.28 |
Firebird Datetime 필드 값 가져오기 (0) | 2011.01.23 |
OpenCV 2.1 Cheat Sheet (0) | 2011.01.20 |