From 0f54e7f02656b6634ae15870c2af272a4d8c4eac Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 5 Jul 2011 18:19:17 +0200 Subject: Update documentation with replacement of driver with nif --- lib/asn1/doc/src/asn1_ug.xml | 48 ++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'lib/asn1/doc/src/asn1_ug.xml') diff --git a/lib/asn1/doc/src/asn1_ug.xml b/lib/asn1/doc/src/asn1_ug.xml index 6d9532a475..f5ff4dc2f2 100644 --- a/lib/asn1/doc/src/asn1_ug.xml +++ b/lib/asn1/doc/src/asn1_ug.xml @@ -347,7 +347,7 @@ erlc -o ../asnfiles -I ../asnfiles -I /usr/local/standards/asn1 Person.asn

This flag has effect only when used together with one of per_bin or ber_bin flags. It gives time optimized code in the generated modules and it uses another runtime module. - In the per_bin case a linked-in driver is used. The + In the per_bin case a nif is used. The result from an encode is a binary.

When this flag is used you cannot use the old format{TypeName,Value} when you encode values. Since it is an unnecessary construct it has been removed in favor of @@ -362,15 +362,14 @@ erlc -o ../asnfiles -I ../asnfiles -I /usr/local/standards/asn1 Person.asn +driver -

Together with the flags ber_bin and optimize - you choose to use a linked in driver for considerable faster - decode.

+

As of R15B this means the same as the nif option. Kept for + backwards compatability reasons.

+nif -

Together with the flags per_bin or ber_bin +

Together with the flags ber_bin and optimize you choose to use a nif for considerable - faster per encode and ber decode.

+ faster decode.

+asn1config @@ -498,7 +497,7 @@ asn1ct:decode('H323-MESSAGES','SomeChoiceType',Bytes). BER - [ber_bin, optimize, driver] + [ber_bin, optimize, nif] EAVF iolist iolist / binary @@ -563,7 +562,7 @@ asn1ct:decode('H323-MESSAGES','SomeChoiceType',Bytes). DER - [ber_bin, optimize, driver, der] + [ber_bin, optimize, nif, der] EAVF iolist binary @@ -632,23 +631,24 @@ asn1ct:decode('H323-MESSAGES','SomeChoiceType',Bytes).

- The sole compile options ber, ber_bin and per - are kept for backwards compatibility and should not be used in - new code. + The sole compile options ber, ber_bin, per and + driver are kept for backwards compatibility and should not be + used in new code. The nif implementation which replaces the linked-in + driver has been shown to be about 5-15% faster.

You are strongly recommended to use the appropriate alternative of the bold typed options. The optimize and - driver options does not affect the encode or decode + nif options does not affect the encode or decode result, just the time spent in run-time. When ber_bin and - driver or per_bin, optimize and driver is - combined the C-code driver is used in chosen parts of encode / + nif or per_bin and optimize is + combined the C-code nif is used in chosen parts of encode / decode procedure.

Compile options, allowed combinations - use of linked-in driver + use of nif [ber] @@ -663,7 +663,7 @@ asn1ct:decode('H323-MESSAGES','SomeChoiceType',Bytes). no - [ber_bin, optimize, driver] + [ber_bin, optimize, nif] yes @@ -675,7 +675,7 @@ asn1ct:decode('H323-MESSAGES','SomeChoiceType',Bytes). no - [per_bin, optimize] + [per_bin, nif] yes @@ -696,12 +696,12 @@ asn1ct:decode('H323-MESSAGES','SomeChoiceType',Bytes). no - [ber_bin, optimize, driver, der] + [ber_bin, optimize, nif, der] yes - When the ASN1 linked-in driver is used. + When the ASN1 nif is used.
@@ -718,14 +718,14 @@ asn1rt:decode('H323-MESSAGES','SomeChoiceType',Bytes).
 'H323-MESSAGES':encode('SomeChoiceType',{call,"octetstring"}).
 'H323-MESSAGES':decode('SomeChoiceType',Bytes).      
-

The asn1 linked-in driver is enabled in two occasions: encoding of +

The asn1 nif is enabled in two occasions: encoding of asn1 values when the asn1 spec is compiled with per_bin and optimize or decode of encoded asn1 values when the asn1 spec is - compiled with ber_bin, optimize and driver. In - those cases the driver will be loaded automatically at the first call + compiled with ber_bin, optimize and nif. In + those cases the nif will be loaded automatically at the first call to encode/decode. If one doesn't want the performance - overhead of the driver being loaded at the first call it is possible - to load the driver separately by asn1rt:load_driver().

+ overhead of the nif being loaded at the first call it is possible + to load the nif separately by loading the asn1rt_nif module.

By invoking the function info/0 in a generated module, one gets information about which compiler options were used.

-- cgit v1.2.3