Skip to content

Commit 20e1c7d

Browse files
authored
[skip ci] documenting can_ada and standard compliance (#63)
1 parent 666418a commit 20e1c7d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
ada-url
22
========
33

4-
This is ``ada_url``, a Python library for working with URLs based on the ``Ada`` URL
4+
The `urlib.parse`` module in Python does not follow the legacy RFC 3978 standard nor
5+
does it follow the newer WHATWG URL specification. It is also relatively slow.
6+
7+
This is ``ada_url``, a fast standard-compliant Python library for working with URLs based on the ``Ada`` URL
58
parser.
69

710
* `Documentation <https://ada-url.readthedocs.io>`__
@@ -134,3 +137,10 @@ Contrast that with the Python standard library's ``urlib.parse`` module:
134137
'www.googlé.com'
135138
>>> parsed_url.path
136139
'/./path/../path2/'
140+
141+
Alternative (can_ada)
142+
-----------
143+
144+
The ada-python bindings are built on CFFI, an approach that has the binding between C and Python written in Python itself, which loses some of the performance benefits of using Ada in the first place when most of the time is spent just making the function call.
145+
146+
The can_ada (Canadian Ada) is a different Python binding that uses pybind11 to generate the binding code, which is then compiled into a Python extension module. This approach has the potential to be much faster than the ada-python bindings. See https://tkte.ch/articles/2024/03/15/parsing-urls-in-python.html

0 commit comments

Comments
 (0)