From ce4838b58104b589894081b6c5cbd52554cf87a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Tom=C3=A1s?= Date: Sun, 19 Feb 2023 23:41:00 -0300 Subject: Add todo.txt --- generate.lisp | 10 ---------- json.asd | 2 +- json.lisp | 10 ++++++++++ todo.txt | 3 +++ 4 files changed, 14 insertions(+), 11 deletions(-) delete mode 100644 generate.lisp create mode 100644 json.lisp create mode 100644 todo.txt diff --git a/generate.lisp b/generate.lisp deleted file mode 100644 index 8bb93e7..0000000 --- a/generate.lisp +++ /dev/null @@ -1,10 +0,0 @@ -(in-package #:json) - -(defmacro obj (&rest fields) - (let ((o (gensym)) - (f (gensym))) - (setf fields (mapcar (lambda (x) (cons 'list x)) fields)) - `(let ((,o (make-hash-table :test #'equal :size ,(length fields)))) - (dolist (,f ,(cons 'list fields)) - (setf (gethash (car ,f) ,o) (cadr ,f))) - ,o))) diff --git a/json.asd b/json.asd index 13436f6..a251951 100644 --- a/json.asd +++ b/json.asd @@ -6,4 +6,4 @@ ((:file "package") (:file "save") (:file "load") - (:file "generate"))) + (:file "json"))) diff --git a/json.lisp b/json.lisp new file mode 100644 index 0000000..8bb93e7 --- /dev/null +++ b/json.lisp @@ -0,0 +1,10 @@ +(in-package #:json) + +(defmacro obj (&rest fields) + (let ((o (gensym)) + (f (gensym))) + (setf fields (mapcar (lambda (x) (cons 'list x)) fields)) + `(let ((,o (make-hash-table :test #'equal :size ,(length fields)))) + (dolist (,f ,(cons 'list fields)) + (setf (gethash (car ,f) ,o) (cadr ,f))) + ,o))) diff --git a/todo.txt b/todo.txt new file mode 100644 index 0000000..b766489 --- /dev/null +++ b/todo.txt @@ -0,0 +1,3 @@ +The loader is kinda slow. Parses 2.9MB of data in 2 seconds. +From which 0.5 seconds are GC time. +4B cycles 1B bytes consed. -- cgit v1.2.3