1 | [[tags: egg]] |
---|
2 | |
---|
3 | == unsafe |
---|
4 | |
---|
5 | [[toc:]] |
---|
6 | |
---|
7 | === Description |
---|
8 | |
---|
9 | Unsafe variants of floating-point, fixnum and SRFI-4 core library procedures. |
---|
10 | |
---|
11 | === Requirements |
---|
12 | |
---|
13 | None |
---|
14 | |
---|
15 | === Documentation |
---|
16 | |
---|
17 | This extension provides modules that are suitable as replacements |
---|
18 | for some core library modules, where many or all exported |
---|
19 | definitions are unsafe in the sense that they do not check argument |
---|
20 | types, giving a performance improvement in speed critical code. |
---|
21 | |
---|
22 | Note that passing arguments of the wrong type to one of these |
---|
23 | operators may result in crashes or undefined behaviour. |
---|
24 | |
---|
25 | The following modules are available in unsafe variants: |
---|
26 | |
---|
27 | * {{(chicken unsafe fixum)}} |
---|
28 | * {{(chicken unsafe flonum)}} |
---|
29 | * {{(unsafe srfi-4)}} |
---|
30 | |
---|
31 | They export exactly the same identifiers as the corresponding |
---|
32 | core modules [[man/5/Module (chicken fixnum)|(chicken fixnum)]], |
---|
33 | [[man/5/Module (chicken flonum)|(chicken flonum)]] and |
---|
34 | [[man/5/Module srfi-4|(srfi 4)]], but with some or all identifiers being |
---|
35 | mapped to unsafe versions instead. |
---|
36 | |
---|
37 | Most of the unsafe variant definitions are inline procedures and |
---|
38 | only give a performance advantage when global inlining |
---|
39 | is activated in compiled code, which requires the {{-inline-global}} |
---|
40 | option (this is also activated at optimization levels 3 or higher). |
---|
41 | |
---|
42 | === Author |
---|
43 | |
---|
44 | felix winkelmann |
---|
45 | |
---|
46 | === Version History |
---|
47 | |
---|
48 | ; 1.0 : Initial release |
---|
49 | |
---|
50 | === License |
---|
51 | |
---|
52 | Copyright (c) 2018, Felix Winkelmann |
---|
53 | All rights reserved. |
---|
54 | |
---|
55 | Redistribution and use in source and binary forms, with or without |
---|
56 | modification, are permitted provided that the following conditions |
---|
57 | are met: |
---|
58 | 1. Redistributions of source code must retain the above copyright |
---|
59 | notice, this list of conditions and the following disclaimer. |
---|
60 | 2. Redistributions in binary form must reproduce the above copyright |
---|
61 | notice, this list of conditions and the following disclaimer in the |
---|
62 | documentation and/or other materials provided with the distribution. |
---|
63 | 3. The name of the authors may not be used to endorse or promote products |
---|
64 | derived from this software without specific prior written permission. |
---|
65 | |
---|
66 | THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR |
---|
67 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
---|
68 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
---|
69 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
---|
70 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
---|
71 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
---|
72 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
---|
73 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
---|
74 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
---|
75 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
---|
76 | |
---|