{ "info": { "author": "Kanshi TANAIKE", "author_email": "tanaike@hotmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5" ], "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", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tanaikech/souwapy", "keywords": "array,sum,speed,algorithm,pyramid,new algorithm", "license": "MIT License", "maintainer": null, "maintainer_email": null, "name": "souwapy", "package_url": "https://pypi.org/project/souwapy/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/souwapy/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/tanaikech/souwapy" }, "release_url": "https://pypi.org/project/souwapy/1.1.1/", "requires_dist": null, "requires_python": null, "summary": "This is a library for summing array elements with high speed by new algorithm.", "version": "1.1.1" }, "last_serial": 2431109, "releases": { "1.0.0": [], "1.1.0": [ { "comment_text": "", "digests": { "md5": "fa3842cb80ea2d9b037cdc63ac358fa3", "sha256": "8cca21530080c562b7ae37871009d82a3a143d675216e9b27ae21693d0eaf3f3" }, "downloads": -1, "filename": "souwapy-1.1.0.tar.gz", "has_sig": false, "md5_digest": "fa3842cb80ea2d9b037cdc63ac358fa3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 52285, "upload_time": "2016-10-30T03:27:19", "url": "https://files.pythonhosted.org/packages/f7/20/8b10180d73124029ecf195ad4444d33367a9781246e9ad39285796d441ec/souwapy-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "9bce80c81a7e374bafd3c2d6b10d5a16", "sha256": "60c965c0a79feefb6fb24e9747bfe91b1761244b3a9333bf3ade858df5a6a1f5" }, "downloads": -1, "filename": "souwapy-1.1.1.tar.gz", "has_sig": false, "md5_digest": "9bce80c81a7e374bafd3c2d6b10d5a16", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 49509, "upload_time": "2016-10-30T03:28:32", "url": "https://files.pythonhosted.org/packages/30/af/64ecc1728dad4c674a776b4acac5d428b40597655d48fde7a641f72226db/souwapy-1.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9bce80c81a7e374bafd3c2d6b10d5a16", "sha256": "60c965c0a79feefb6fb24e9747bfe91b1761244b3a9333bf3ade858df5a6a1f5" }, "downloads": -1, "filename": "souwapy-1.1.1.tar.gz", "has_sig": false, "md5_digest": "9bce80c81a7e374bafd3c2d6b10d5a16", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 49509, "upload_time": "2016-10-30T03:28:32", "url": "https://files.pythonhosted.org/packages/30/af/64ecc1728dad4c674a776b4acac5d428b40597655d48fde7a641f72226db/souwapy-1.1.1.tar.gz" } ] }