fast 0.3.1
A library that aims to provide the fastest possible implementation of some every day routines.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
fast
This library aims to provide the fastest possible implementation of some every day routines.
The contained functions avoid GC allocations and input validation. They may use SSE or stack allocations to reach a high throughput so that in some cases a 20 fold speed increase can be achieved.
Benchmark
A benchmark is included and can be run through dub, e.g.:
dub --build=release --compiler=gdc
Examples
Read JSON file with coordinates.
struct Coord { double x, y, z; }
void main()
{
import fast.json;
auto coords = json.coordinates.read!(Coord[]);
}
SSE3 accelerated splitting around '/' and ''
string rest = pathname
string element;
import fast.string;
while (rest.split!`or(=\,=/)`(element, rest))
{
// `element' is now the next directory.
// `rest' is what remains after the \ or /.
}
// `element` is now the file name part of the path.
Calling Windows API functions.
void createHardlink(string from, string to)
{
import fast.cstring : wcharPtr;
CreateHardLinkW(wcharPtr!to, wcharPtr!from, null);
}
Calling Linux API functions.
void createHardlink(string from, string to)
{
import fast.cstring : charPtr;
link(charPtr!from, charPtr!to);
}
- Registered by Marco Leise
- 0.3.1 released 9 years ago
- mleise/fast
- github.com/mleise/fast
- GPL-3.0
- Copyright © 2015, Marco Leise
- Authors:
- Dependencies:
- none
- Versions:
-
0.3.5 2019-Jan-11 0.3.4 2018-Dec-21 0.3.3 2018-Apr-06 0.3.2 2017-Jul-05 0.3.1 2015-Nov-17 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
1890 downloads total
-
- Score:
- 2.1
- Short URL:
- fast.dub.pm