From 00ff3c9bb8ec52ac9f7810c74557beaa2dea18b1 Mon Sep 17 00:00:00 2001 From: PyYoshi Date: Tue, 28 Mar 2017 10:29:19 +0900 Subject: [PATCH] add benchmark results --- README.rst | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 2a5f823..fae781d 100644 --- a/README.rst +++ b/README.rst @@ -212,11 +212,53 @@ Example # -*- coding: utf-8 -*- import cchardet as chardet - with open(r"src/tests/testdata/wikipediaJa_One_Thousand_and_One_Nights_SJIS.txt", "rb") as f: + with open(r"src/tests/samples/wikipediaJa_One_Thousand_and_One_Nights_SJIS.txt", "rb") as f: msg = f.read() result = chardet.detect(msg) print(result) +Benchmark +--------- + +.. code-block:: bash + + $ cd src/ + $ pip install chardet + $ python tests/bench.py + + +Results +~~~~~~~ + +CPU: Intel(R) Core(TM) i5-4690 CPU @ 3.50GHz + +RAM: DDR3 1600Mhz 16GB + +Platform: Ubuntu 16.04 amd64 + +Python 2.7.12 +^^^^^^^^^^^^^ + ++----------+------------------+ +| | Request (call/s) | ++==========+==================+ +| chardet | 0.26 | ++----------+------------------+ +| cchardet | 1341.81 | ++----------+------------------+ + +Python 3.6.0 +^^^^^^^^^^^^ + ++----------+------------------+ +| | Request (call/s) | ++==========+==================+ +| chardet | 0.26 | ++----------+------------------+ +| cchardet | 1472.43 | ++----------+------------------+ + + LICENSE -------