perfolation


License

License

MIT
GroupId

GroupId

com.outr
ArtifactId

ArtifactId

perfolation_0.27
Last Version

Last Version

1.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

perfolation
perfolation
Project URL

Project URL

https://github.com/outr/perfolation
Project Organization

Project Organization

com.outr
Source Code Management

Source Code Management

https://github.com/outr/perfolation

Download perfolation_0.27

How to add to project

<!-- https://jarcasting.com/artifacts/com.outr/perfolation_0.27/ -->
<dependency>
    <groupId>com.outr</groupId>
    <artifactId>perfolation_0.27</artifactId>
    <version>1.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.outr/perfolation_0.27/
implementation 'com.outr:perfolation_0.27:1.2.0'
// https://jarcasting.com/artifacts/com.outr/perfolation_0.27/
implementation ("com.outr:perfolation_0.27:1.2.0")
'com.outr:perfolation_0.27:jar:1.2.0'
<dependency org="com.outr" name="perfolation_0.27" rev="1.2.0">
  <artifact name="perfolation_0.27" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.outr', module='perfolation_0.27', version='1.2.0')
)
libraryDependencies += "com.outr" % "perfolation_0.27" % "1.2.0"
[com.outr/perfolation_0.27 "1.2.0"]

Dependencies

compile (1)

Group / Artifact Type Version
ch.epfl.lamp : dotty-library_0.27 jar 0.27.0-RC1

test (1)

Group / Artifact Type Version
org.scalatest : scalatest_0.27 jar 3.2.2

Project Modules

There are no modules declared in this project.

perfolation

Build Status Gitter Maven Central Latest version

Performance focused interpolation

Based on the original work of Dmitry Komanov (https://medium.com/@dkomanov/scala-string-interpolation-performance-21dc85e83afd).

Note: the current version of the interpolation Macro is a complete rip-off of fast-string-interpolator as their performance is superior, but they don't currently support Scala.js or Scala Native.

What is it?

As shown in the article by Dmitry Komanov, Scala's s"" and f"" interpolation are incredibly slow. This is an effort make String interpolation as fast as it should be with the additional features of type-safe formatting with code-completion.

Main Features

String interpolation

Original:

s"Interpolation of $string"

Better:

p"Interpolation of $string"

Type-safe alternatives to String format

Original:

f"Time: $timeInMillis%tT, Date: $timeInMillis%tD"

Better:

p"Time: ${timeInMillis.t.T}, Date: ${timeInMillis.t.D}"

Getting Started

Support for Scala (2.11, 2.12), Scala.js (2.11, 2.12), and ScalaNative (2.11)

SBT Dependencies:

libraryDependencies += "com.outr" %%% "perfolation" % "1.0.4"

Usage:

Simply import perfolation._ and start using:

import perfolation._

val greeting = "Hello, World!"
val time = System.currentTimeMillis()

println(p"$greeting @ ${time.t.T}")
com.outr

OUTR Technologies

Versions

Version
1.2.0