emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JSON/YAML/TOML/etc. parsing performance


From: Paul Eggert
Subject: Re: JSON/YAML/TOML/etc. parsing performance
Date: Sun, 8 Oct 2017 23:22:01 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

Philipp Stephani wrote:
Should I at least add an eassert to document this?

I wouldn't. Many calls to memory allocators would have problems if they request more than PTRDIFF_MAX bytes, given the problems that C programs have when doing pointer arithmetic on large objects. It would be a waste of time to document this in every call by doing an eassert. Simply calling a memory allocator that is documented to not return such objects, should make it clear to the reader what is going on.

I've attached a new patch (which currently segfaults on
decode_coding_gap, but the call to that function doesn't seem to be
required anyway).

Thanks, I plan to take a look at it after the decode_coding_gap issue is 
addressed.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]