• 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
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

Performance: Kotlin vs Java  RSS feed

 
Saloon Keeper
Posts: 2406
296
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!