souwapy


Namesouwapy JSON
Version 1.1.1 PyPI version JSON
download
home_pagehttps://github.com/tanaikech/souwapy
SummaryThis is a library for summing array elements with high speed by new algorithm.
upload_time2016-10-30 03:28:32
maintainerNone
docs_urlNone
authorKanshi TANAIKE
requires_pythonNone
licenseMIT License
keywords array sum speed algorithm pyramid new algorithm
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # souwapy

This is a Python's library for summing array elements with high speed by new algorithm. The speed is faster than csv and panbdas module of python and v8 engine of node.js. The souwapy module is 2.3 and 3.1 times faster than csv and pandas module, respectively.

## Description

SOUWA means summing in Japanese.

"souwapy" can sum string elements in an array with the high speed. The speed of souwapy with new algorithm is more than 1 digit faster than that of the standard algorithm. You can see the detailed theory of this library at [here](https://tanaikech.github.io/2016/10/13/improved-algorithms-for-summation-of-array-elements/). If you are interested in this, I'm glad. And if the theory had already been reported elsewhere, please let me know. I would like to study it.

## Requirement

- This library was confirmed the operation at python 2.7 and 3.5.

## Usage

```
$ pip install souwapy
```

Also you can download this from [GitHub](https://github.com/tanaikech/souwapy).

You can use this by following script.

```
from souwapy import SOUWA

s = SOUWA.sou()
result = s.getcsvdata(array, ",", "\n")
```

"array" is the array that you want to sum all elements. Arrays are 1, 2 dimensions and more dimensions.  e.g. Array = [a, b, c,,,,,] or Array = [[a, b, c], [d, e, f, g],,,,,]. Delimiter is ',' and ':' and etc. End code is '\n' and '\r\n' and etc.

You can try this library using sample script in directly of "tests".

## Theory of new algorithm

"souwapy" is a library for summing array elements with high speed using new algorithm. This algorithm had been made for Google Apps Script (GAS). It was found that the algorithm is also useful for python by measuring the speed. So this was made.

The algorithm is much faster speed than that of the standard algorithm using "+" operator as shown in following figure.

![](fig1.png)

You can see the difference from above figure. Red and blue lines show the standard and new algorithm, respectively. When the number of elements increases, the summing process time increases. The behavior of the increase is different between standard and new algorithm. At the standard one, the process time increases proportionally to square of the number of elements. On the other hand, at new one, the process time increases lineally to the number of elements. This difference leads to the difference of process time.

In order to show clearly the difference, the ratio of difference (new algorithm / standard algorithm) is shown as following figure.

![](fig2.png)

This figure shows the ratio of process time. This ratio also shows the difference of speed. At 1,000,000 elements, the speed of new algorithm is about 10 times faster than that of standard one. By the way, at GAS, the ratio of speed became about 380 times for 1,000,000 elements.

Following figure shows the process time vs. the number of array elements, when the array is outputted to a csv file. Blue, red, orange and green show the standard algorithm, pandas module, csv module and souwapy module, respectively.

![](fig3.png)

The speed of each module is much faster than that of standard algorithm. In the speed of each module, csv module is 1.4 times faster than pandas module. The souwapy module is 2.3 and 3.1 times faster than csv and pandas module, respectively. It is found that the speed for translating from the array data to the csv file is souwapy module is the fastest in csv and pandas module.

You can see the detailed theory of this algorithm at following reports.

- [Improved Algorithms for Summation of Array Elements](https://tanaikech.github.io/2016/10/13/improved-algorithms-for-summation-of-array-elements/)

- [Effects on Optimized Codes of Pyramid Method](https://tanaikech.github.io/2016/10/13/effects-on-optimized-codes-of-pyramid-method/)

## Licence

[MIT](LICENCE)

## Author

[TANAIKE](https://github.com/tanaikech)

If you have some questions, feel free to tell me.



            

Raw data

            {
    "maintainer": null, 
    "docs_url": null, 
    "requires_python": null, 
    "maintainer_email": null, 
    "cheesecake_code_kwalitee_id": null, 
    "keywords": "array,sum,speed,algorithm,pyramid,new algorithm", 
    "upload_time": "2016-10-30 03:28:32", 
    "author": "Kanshi TANAIKE", 
    "home_page": "https://github.com/tanaikech/souwapy", 
    "github_user": "tanaikech", 
    "download_url": "https://pypi.python.org/packages/30/af/64ecc1728dad4c674a776b4acac5d428b40597655d48fde7a641f72226db/souwapy-1.1.1.tar.gz", 
    "platform": "UNKNOWN", 
    "version": "1.1.1", 
    "cheesecake_documentation_id": null, 
    "description": "# souwapy\r\n\r\nThis is a Python's library for summing array elements with high speed by new algorithm. The speed is faster than csv and panbdas module of python and v8 engine of node.js. The souwapy module is 2.3 and 3.1 times faster than csv and pandas module, respectively.\r\n\r\n## Description\r\n\r\nSOUWA means summing in Japanese.\r\n\r\n\"souwapy\" can sum string elements in an array with the high speed. The speed of souwapy with new algorithm is more than 1 digit faster than that of the standard algorithm. You can see the detailed theory of this library at [here](https://tanaikech.github.io/2016/10/13/improved-algorithms-for-summation-of-array-elements/). If you are interested in this, I'm glad. And if the theory had already been reported elsewhere, please let me know. I would like to study it.\r\n\r\n## Requirement\r\n\r\n- This library was confirmed the operation at python 2.7 and 3.5.\r\n\r\n## Usage\r\n\r\n```\r\n$ pip install souwapy\r\n```\r\n\r\nAlso you can download this from [GitHub](https://github.com/tanaikech/souwapy).\r\n\r\nYou can use this by following script.\r\n\r\n```\r\nfrom souwapy import SOUWA\r\n\r\ns = SOUWA.sou()\r\nresult = s.getcsvdata(array, \",\", \"\\n\")\r\n```\r\n\r\n\"array\" is the array that you want to sum all elements. Arrays are 1, 2 dimensions and more dimensions.  e.g. Array = [a, b, c,,,,,] or Array = [[a, b, c], [d, e, f, g],,,,,]. Delimiter is ',' and ':' and etc. End code is '\\n' and '\\r\\n' and etc.\r\n\r\nYou can try this library using sample script in directly of \"tests\".\r\n\r\n## Theory of new algorithm\r\n\r\n\"souwapy\" is a library for summing array elements with high speed using new algorithm. This algorithm had been made for Google Apps Script (GAS). It was found that the algorithm is also useful for python by measuring the speed. So this was made.\r\n\r\nThe algorithm is much faster speed than that of the standard algorithm using \"+\" operator as shown in following figure.\r\n\r\n![](fig1.png)\r\n\r\nYou can see the difference from above figure. Red and blue lines show the standard and new algorithm, respectively. When the number of elements increases, the summing process time increases. The behavior of the increase is different between standard and new algorithm. At the standard one, the process time increases proportionally to square of the number of elements. On the other hand, at new one, the process time increases lineally to the number of elements. This difference leads to the difference of process time.\r\n\r\nIn order to show clearly the difference, the ratio of difference (new algorithm / standard algorithm) is shown as following figure.\r\n\r\n![](fig2.png)\r\n\r\nThis figure shows the ratio of process time. This ratio also shows the difference of speed. At 1,000,000 elements, the speed of new algorithm is about 10 times faster than that of standard one. By the way, at GAS, the ratio of speed became about 380 times for 1,000,000 elements.\r\n\r\nFollowing figure shows the process time vs. the number of array elements, when the array is outputted to a csv file. Blue, red, orange and green show the standard algorithm, pandas module, csv module and souwapy module, respectively.\r\n\r\n![](fig3.png)\r\n\r\nThe speed of each module is much faster than that of standard algorithm. In the speed of each module, csv module is 1.4 times faster than pandas module. The souwapy module is 2.3 and 3.1 times faster than csv and pandas module, respectively. It is found that the speed for translating from the array data to the csv file is souwapy module is the fastest in csv and pandas module.\r\n\r\nYou can see the detailed theory of this algorithm at following reports.\r\n\r\n- [Improved Algorithms for Summation of Array Elements](https://tanaikech.github.io/2016/10/13/improved-algorithms-for-summation-of-array-elements/)\r\n\r\n- [Effects on Optimized Codes of Pyramid Method](https://tanaikech.github.io/2016/10/13/effects-on-optimized-codes-of-pyramid-method/)\r\n\r\n## Licence\r\n\r\n[MIT](LICENCE)\r\n\r\n## Author\r\n\r\n[TANAIKE](https://github.com/tanaikech)\r\n\r\nIf you have some questions, feel free to tell me.\r\n\r\n\r\n", 
    "lcname": "souwapy", 
    "bugtrack_url": null, 
    "github": true, 
    "coveralls": true, 
    "name": "souwapy", 
    "license": "MIT License", 
    "travis_ci": false, 
    "github_project": "souwapy", 
    "summary": "This is a library for summing array elements with high speed by new algorithm.", 
    "split_keywords": [
        "array", 
        "sum", 
        "speed", 
        "algorithm", 
        "pyramid", 
        "new algorithm"
    ], 
    "author_email": "tanaike@hotmail.com", 
    "urls": [
        {
            "has_sig": false, 
            "upload_time": "2016-10-30T03:28:32", 
            "comment_text": "", 
            "python_version": "source", 
            "url": "https://pypi.python.org/packages/30/af/64ecc1728dad4c674a776b4acac5d428b40597655d48fde7a641f72226db/souwapy-1.1.1.tar.gz", 
            "md5_digest": "9bce80c81a7e374bafd3c2d6b10d5a16", 
            "downloads": 0, 
            "filename": "souwapy-1.1.1.tar.gz", 
            "packagetype": "sdist", 
            "path": "30/af/64ecc1728dad4c674a776b4acac5d428b40597655d48fde7a641f72226db/souwapy-1.1.1.tar.gz", 
            "size": 49509
        }
    ], 
    "_id": null, 
    "cheesecake_installability_id": null
}