• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

Performance: Kotlin vs Java  RSS feed

 
Saloon Keeper
Posts: 2504
321
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any appreciable difference in application size or run-time performance between the bytecode compiled from Kotlin vs Java?
 
Author
Posts: 105
5
Android Python Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ron,

The Kotlin runtime will add a little to your app size, adding around 1MB. The performance in simple terms would be the same, because both languages can be compiled down to the same byte codes. However, co-routines (finalised at the end of last year) allow you to use threads much more efficiently by writing your code in a different style. Therefore, you can more easily write code that will make use of CPU resources that would otherwise be blocked.

(Check out the appendix in Head First Kotlin where we write a drum machine on a single thread with coroutines...)

Thanks for the question

D+D
 
Ruth Stout was famous for gardening naked. Just like this tiny ad:
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!