Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/tk3369/SASLib.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
tk3369 committed Dec 19, 2017
2 parents 2ff8fa1 + 2bccb43 commit c44453c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
19 changes: 19 additions & 0 deletions LICENSE_SAS7BDAT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2015 Jared Hobbs

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,21 @@ results = SASLib.read(handler, 3) # read 3 rows
results = SASLib.read(handler, 4) # read next 4 rows
SASLib.close(handler) # remember to close the handler when done
```
## Read Performance
I would have expected Julia to be 10x faster than Python but depending on the characterisitc of the data file and target platform I am getting mixed results. Pandas uses Cython to speed up the core section of the code.
When I have time I will publish some test results. I would also be happy to hear about your experience - feel free to create an issue with your performance test results.
## Why another package?
At first, I was just going to use ReadStat. However, ReadStat does not support reading files with compressed binary data. I could have chosen to contribute to that project instead but I would rather learn and code in Julia instead ;-) The implementation in Pandas is fairly straightforward, making it a relatively easy porting project.
## Porting Notes
I chose to copy the code from Pandas and made minimal changes so I can have a working version quickly. Hence, the code isn't very Julia-friendly e.g. variable and function naming are all mixed up. It is not a priority at this point but I would think some major refactoring would be required to make it more clean & performant.
## Credits
Many thanks to Jared Hobbs, the original author of the SAS I/O code from Python Pandas.

0 comments on commit c44453c

Please sign in to comment.