Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #35669

Re: Java is faster!

From Arne Vajhøj <arne@vajhoej.dk>
Newsgroups comp.lang.java.programmer
Subject Re: Java is faster!
Date 2016-09-29 21:24 -0400
Organization Aioe.org NNTP Server
Message-ID <nskerv$1f8m$1@gioia.aioe.org> (permalink)
References <faster-20160923143035@ram.dialup.fu-berlin.de> <1l9fub927k9tntoli9cddnfil6e4o74are@4ax.com> <ns93lq$fpv$1@news.albasani.net>

Show all headers | View raw


On 9/25/2016 2:05 PM, j4n bur53 wrote:
> Since Java is typesafe, and this typesafety goes
> vary far, recently, after much time, I have
> even created a runtime error when assigning
> an array cell, so the component type of the array
> didn't match the element type.
>
> I think there is a general limit. This typesafety
> is still ingrained in the runtime. Although casts
> are highly optimized, they don't go away. I recently
> made some other experiments, and bumpted my head
> speed wise just because of the many casts I needed.
>
> So if all is well typed, no casts and a lot of primitive
> types, I guess you get speed. But if you use more
> generic data structures, I see some problems just
> because of the casts, although some caching techniques
> are used inside the JVM.(*)

This is probably mostly important in what was once
labeled scientific computing (as opposed to business
computing).

In theory I think the JIT compiler could move a lot
of the type checking outside of inner loops and thereby
minimize the overhead.

But there are probably some impact left.

Also note that Java has never gained so much
traction in scientific computing as in many other
areas.

I suspect that type check, array index check
and lack of user defined value types play a role
in that.

Arne

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Java is faster! Roedy Green <inquiry@mindprod.com> - 2016-09-25 03:28 -0700
  Re: Java is faster! j4n bur53 <janburse@fastmail.fm> - 2016-09-25 20:05 +0200
    Re: Java is faster! Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-09-25 14:44 -0400
      Re: Java is faster! j4n bur53 <janburse@fastmail.fm> - 2016-09-26 23:09 +0200
        Re: Java is faster! Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-09-27 10:51 -0400
          Re: Java is faster! Sebastian <nowhere@nirvana.org> - 2016-09-28 23:50 +0530
            Re: Java is faster! Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-09-28 15:14 -0400
              Re: Java is faster! j4n bur53 <janburse@fastmail.fm> - 2016-09-29 09:11 +0200
    Re: Java is faster! Arne Vajhøj <arne@vajhoej.dk> - 2016-09-29 21:24 -0400
  Re: Java is faster! Jerry Stuckle <jstucklex@attglobal.net> - 2016-09-25 16:37 -0400
    Re: Java is faster! Eric Douglas <e.d.programmer@gmail.com> - 2016-09-26 05:47 -0700
      Re: Java is faster! Robert Klemme <shortcutter@googlemail.com> - 2016-10-04 23:04 +0200
  Re: Java is faster! Arne Vajhøj <arne@vajhoej.dk> - 2016-09-29 21:18 -0400

csiph-web