From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,13c7ec19f3c43155 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!feeder4.cambrium.nl!feed.tweaknews.nl!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: speed of generic code in Ada (vs Java) References: <9e9bdae7-5e91-4e0c-b783-1ed72311a733@t12g2000prg.googlegroups.com> <2e1de55a-69e5-439e-addc-bde650b4c16a@i36g2000prf.googlegroups.com> Date: Fri, 16 May 2008 20:54:55 +0200 Message-ID: <87wsluulj4.fsf@ludovic-brenta.org> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:kX43DWKRlZU5Lf1vDOPB+YE5WSg= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Tele2 X-Trace: DXC=>gEVl[IhQEbQ@8iTl]i3Ll6`Y6aWje^YjETC3PXeOI]o1B4<]HH1:nc?N]F2>mS4kk`OeeekCOJ0n Xref: g2news1.google.com comp.lang.ada:113 Date: 2008-05-16T20:54:55+02:00 List-Id: jimmaureenrogers writes: > On May 16, 11:31 am, "jhc0...@gmail.com" wrote: >> Java only allows 'objects' as generics parameters. So, if you define a >> generic class and use 'Integer' as a parameter, your code will be slow >> because of the boxing - up to 5x compared to non-generic Int (see the >> recent discussion in comp.lang.java.programmer - the 'numerics' >> thread). Is the situation similar with generics in Ada, GNAT, >> specifically? > > No. To add to Jim's excellent answer: Ada got it right the first time, back in 1980. -- Ludovic Brenta.