[gambit-list] ##car ##cdr ##null?

Álvaro Castro-Castilla alvaro.castro.castilla at gmail.com
Fri Jun 11 09:06:24 EDT 2010


2010/6/11 Mikael <mikael.trash at gmail.com>

>
> 2010/6/11 Álvaro Castro-Castilla <alvaro.castro.castilla at gmail.com>
>
>> Hi,
>>
>> I can see sometimes these kind of procedures ##car, ##cdr, ##null? etc...
>> in code that has been optimized for Gambit. What is exactly the difference
>> between those and the standard ones?
>>
>
> (declare (safe))
> (car x) ; Argument typechecking made
> (##car x) ; No argument typechecking made
>
> (declare (not safe))
> (##car x) ; No argument typechecking made
> (car x) ; No argument typechecking made
>
>
>> And if these ones are faster, why are they defined as separate functions
>> instead of just substituting the standard ones when in (unsafe) compilation?
>>
>
> Substitution is made automatically on (not safe) compilation.
>
>


Ah! ok, so it is actually done, but these procedures allow for using those
unsafe versions even in "safe" compilation...

Thanks a lot!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20100611/be084b24/attachment.htm>


More information about the Gambit-list mailing list