Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: Advice on learning Perl and graphics (Static vs Dynamic Typing and JIT)

by eyepopslikeamosquito (Archbishop)
on Oct 17, 2022 at 12:17 UTC ( [id://11147482]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Advice on learning Perl and graphics
in thread Advice on learning Perl and graphics

hippo you've caught me unprepared! ... so I can feel a future meditation brewing on this complex and interesting topic. :)

Static typing usually results in compiled code that executes faster. When the compiler knows the exact data types that are in use (which is necessary for static verification, either through declaration or inference) it can produce optimized machine code. Some dynamically-typed languages such as Common Lisp allow optional type declarations for optimization for this reason.

-- from Type system (wikipedia)

As indicated by the quote above, my performance assumption of the five listed (statically typed) languages (including Java) was based solely on the well-known general properties of static vs dynamic typing.

When I programmed in Java years ago, I remember the HotSpot technology muddying the performance waters when attempting to compare Java to C++ because (at least in theory) Java HotSpot could perform gradual dynamic performance optimizations at run-time (based on HotSpot profiling and the specific hardware it was running on) which C++ could not (update: nowadays it can, thanks to Chris Lattner's LLVM and Clang). Despite that, I've always loved C++ and disliked Java, and would always back C++ against Java in any specific benchmark shootout. :)

Extra References Added Later

  • Comment on Re^3: Advice on learning Perl and graphics (Static vs Dynamic Typing and JIT)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11147482]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (None)
    As of 2024-04-25 00:02 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found