InlineStringLiteralsVsStringConstants

Performance benchmark to check inline string literals compared to CONST strings.

InlineStringLiteralsVsStringConstants

Performance benchmark to check inline string literals compared to CONST strings.

Usage

  • crystal benchmark.cr --release
  • crystal benchmark_2.cr -- release (if you want no exception generation)

Current Results (with exceptions)

  • I believe it's a negligible performance difference. A developer should not worry at all. Use whatever way you feel more comfortable with!

Current Results (without exceptions)

  • Main takeaway: Wow, no bytes per operation O_o

Contributing

If you can make this benchmark better, please create a PR / issue!

Thank you and have a wonderful day!

Repository

InlineStringLiteralsVsStringConstants

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 0
  • almost 6 years ago
  • October 6, 2019
License

Links
Synced at

Wed, 17 Sep 2025 17:19:12 GMT

Languages