<div dir="ltr"><pre style="white-space:pre-wrap;color:rgb(0,0,0)">> Also, looking at the msgpack - this code is maybe not ideal, but if
> you're dealing with buffer-level protocols, you end up with code
> looking like C a lot.</pre><div class="gmail_extra">I do agree that this type a code will likely end up looking like C but it's not necessary for all of it to look like c.  Like there should be a need to have long chains of if, elif statements.  Using pack_into and unpack_from instead of pack and unpack methods so that it directly deals with the buffer instead of making sub strings.  Even if pypy can optimize this away why write Python code like this when its not necessary.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Plus I felt, initially the code should just use cffi and connect to the native c library.  I believe this approach is likely to give very close to the best performance you could get on pypy for this type of library.  I'm not sure how much of an increase in performance would be gain by writing the library completely in Python vs using cffi.  Is there anything wrong with this line of thinking.  Do you feel a pure Python approach could achieve better results than using cffi under pypy.<br>
<br><div class="gmail_quote" style>John</div></div></div>