edn_turbo 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e737afa166083d5aaa0de28d796cc0600328efa7
4
- data.tar.gz: ea373f461fa3ab36984fda13032c807eb44a26d4
3
+ metadata.gz: 1e0ee4c88910b841529aead1cb72598a52558bc5
4
+ data.tar.gz: 36a8ab68264720ebe0e7c5ffb20cb802a3b0a2ca
5
5
  SHA512:
6
- metadata.gz: 06a184edd65e207c593e473078106c4727bfb7aea7e5df1373a37ab28c468ac9f19b04ddafaf9b5ae2b97196d29d25dbb957038d9fb22f24201eacd922567ba3
7
- data.tar.gz: 0d8af5293af6611246bf36fbbe2b06c157ca2c248fc2f2f546d4077fea45761e2cb4ce0d63fa0c218d906a33a5ec2f75007b27cbfe5ac3422cb1073d7ef2b579
6
+ metadata.gz: b677553c38f822a5abcd4cb9601bd910f2246ec229b4c8bdecf9d47b5151ae000258fe4ef5e372901b1a54c8ee38c10ca785e0d234a6723bef3ef3fb7f2cb543
7
+ data.tar.gz: 8f0972fe531fe771b924c453965bf45c91622232fdf85a236e8fb9f44cd53a188cb34c081bd2fc4ec46d920d1d3a8a61d393359ae84a5027750071a033805903
data/README.md CHANGED
@@ -1,30 +1,70 @@
1
- edn_ext
1
+ edn_turbo
2
2
  ============
3
3
 
4
- Ruby C-extension for EDN file parser
4
+ Ruby C-extension for parsing EDN files.
5
+
6
+ Written based on the functionality of
7
+ [edn](https://github.com/relevance/edn-ruby) but with the goal of
8
+ achieving much faster parsing. Currently supports a subset of the EDN
9
+ spec, primarily that created from dumping ruby object data in EDN
10
+ format. Support for tagged elements, sets, and full unicode is coming
11
+ soon.
12
+
13
+ Some quick sample runs comparing time output of file reads using `edn`
14
+ and `edn_turbo`:
15
+
16
+ 1. 792K data file:
17
+
18
+ ```
19
+ with edn
20
+
21
+ real 0m1.022s
22
+ user 0m0.960s
23
+ sys 0m0.047s
24
+
25
+ with edn_turbo
26
+
27
+ real 0m0.132s
28
+ user 0m0.091s
29
+ sys 0m0.038s
30
+ ```
31
+
32
+ 2. 43M data file:
33
+
34
+ ```
35
+ with edn
36
+
37
+ real 0m55.922s
38
+ user 0m55.155s
39
+ sys 0m0.339s
40
+
41
+ with edn_turbo
42
+
43
+ real 0m1.976s
44
+ user 0m1.844s
45
+ sys 0m0.111s
46
+ ```
5
47
 
6
48
  Dependencies
7
49
  ============
8
50
 
9
- Minimum required versions shown of the following:
10
51
  - ruby gems:
11
52
  - [rake 10.3.2](http://rake.rubyforge.org)
12
53
  - [rake-compiler 0.9.2](http://rake-compiler.rubyforge.org)
13
54
  - [rice 1.7.0](http://rice.rubyforge.org)
55
+ - [icu4c](http://icu-project.org/apiref/icu4c/)
14
56
 
15
- Setup
16
- =====
17
-
18
- - Install gem dependencies:
57
+ `edn_turbo` uses a ragel-based parser but the generated .cc file is
58
+ bundled so ragel should not need to be installed.
19
59
 
20
- ```
21
- gem install rake rake-compiler rice
22
- ```
23
60
 
24
61
  Usage
25
62
  =====
26
63
  ```ruby
27
- require 'edn_ext'
64
+ require 'edn_turbo'
28
65
 
29
- pp EDN_EXT.read("some_file.edn")
66
+ File.open(filename) do |file|
67
+ output = EDNT.read(file)
68
+ pp output if output != nil
69
+ end
30
70
  ```