[Openmcl-devel] Lisp Comparison
Rainer Joswig
joswig at lisp.de
Wed Apr 19 09:22:30 PDT 2017
See http://ccl.clozure.com/manual/chapter10.1.html#CCL-Stream-Extensions <http://ccl.clozure.com/manual/chapter10.1.html#CCL-Stream-Extensions>
10.1.3 Basic vs. Fundamental streams
Basic streams are builtin classes. Fundamental streams are built on CLOS classes and more extensible.
? (with-open-file (in "/tmp/test.data") (describe in))
#<BASIC-FILE-CHARACTER-INPUT-STREAM ("/tmp/test.data"/18 UTF-8) #x302001717CED>
Type: CCL::BASIC-FILE-CHARACTER-INPUT-STREAM
Class: #<BUILT-IN-CLASS CCL::BASIC-FILE-CHARACTER-INPUT-STREAM>
vs.:
(with-open-file (in "/tmp/test.data" :class 'CCL::FUNDAMENTAL-FILE-CHARACTER-INPUT-STREAM) (describe in))
#<FUNDAMENTAL-FILE-CHARACTER-INPUT-STREAM ("/tmp/test.data"/18 UTF-8) #x3020017580BD>
Class: #<STANDARD-CLASS CCL::FUNDAMENTAL-FILE-CHARACTER-INPUT-STREAM>
> Am 19.04.2017 um 18:07 schrieb Joshua Kordani <jkordani at lsa2.com>:
>
> What are CLOS/nonCLOS based streams?
>
>
> On 4/19/17 4:31 AM, Rainer Joswig wrote:
>>> Am 19.04.2017 um 05:39 schrieb Craig Lanning <craig.t.lanning at gmail.com>:
>>>
>>> On Tue, 2017-04-18 at 16:34 -0700, David McClain wrote:
>> ...
>>
>>> Yes, all code is compiled. No code is run interpreted. It is designed
>>> the way it is specifically for that reason.
>> Things I would usually look for:
>>
>>
>> * is everything compiled?
>>
>> * slow stream I/O
>>
>> * slow unbuffered stream I/O
>> -> for example when reading lines allocating a new string for each line
>> -> or generally unbuffered streams with a lot of character operations
>>
>> * slow CLOS-based stream I/O -> in CCL CLOS based streams are usually slower than non-CLOS streams
>>
>> * slow unicode stream operations
>>
>> * slow unicode string operations
>>
>> * repeated translation between character representations in strings
>>
>> * excessive consing / slow garbage collection time -> use TIME to see the GC time
>>
>> * excessive FLOAT consing -> CCL needs more declarations / tricks
>>
>> * forgotten calls to the sleep function ;-)
>>
>> * lots of background output/logging/tracing, debug options enabled
>>
>> * time sensitive functions compiled with the wrong compiler optimizations
>>
>> * tail calls not optimized, when needed
>>
>> * algorithmic problems in user code or in the implementation: n^2 or worse complexity
>> -> consing to the end of a list
>> -> copying arrays in loops
>> -> adjusting strings by one element
>>
>>
>>
>> _______________________________________________
>> Openmcl-devel mailing list
>> Openmcl-devel at clozure.com
>> https://lists.clozure.com/mailman/listinfo/openmcl-devel
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> https://lists.clozure.com/mailman/listinfo/openmcl-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20170419/ecd750bc/attachment.htm>
More information about the Openmcl-devel
mailing list