Skip to content

Commit

Permalink
* Fixed BechmarksLibrary when netcoreapp
Browse files Browse the repository at this point in the history
* Updated README.md
  • Loading branch information
[email protected] committed May 28, 2020
1 parent 86155c8 commit 9c8efd5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 23 deletions.
16 changes: 1 addition & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dotnet LinqRewrite.dll <path-to-csx> <path-to-rewrite> # Rewrites csx file

## Example projects

With release of LinqRewrite there are also included two example projects. The first one is BenchmarksLibrary (with set of benchmarks for LinqRewrite) and the second one is TestsLibrary.
With release of LinqRewrite there are also included two example projects. The first one is BenchmarksLibrary (with set of benchmarks for LinqRewrite) and the second one is TestsLibrary. You can run prepared bat scripts for running of example project or run them manually from command line.

For building and executing TestsLibrary you must run the following commands:
```bash
Expand All @@ -39,13 +39,6 @@ cd directory
dotnet run
```

When you are in Release directory of source you can insert following:
```bash
dotnet ./LinqRewrite.dll ../../../../Tests/TestsLibrary/TestsLibrary.csproj directory
cd directory
dotnet run
```

For building and executing BenchmarksLibrary you must run the following commands:
```bash
cd LinqRewriteDir # Full path to LinqRewrite
Expand All @@ -54,13 +47,6 @@ cd directory
dotnet run
```

When you are in Release directory of source you can insert following:
```bash
dotnet ./LinqRewrite.dll ../../../../Tests/BenchmarksLibrary/BenchmarksLibrary.csproj directory
cd directory
dotnet run
```

# Rewriting of code

LinqRewrite rewrites LINQ queries into procedural code. It creates method with code equivalent to LINQ query and then it replaces LINQ query with call of the method. It reduces allocations, increases performance and implements a lot of optimization for example math optimization. You can see source and rewritten code in example below.
Expand Down
2 changes: 1 addition & 1 deletion RunRewrittenBenchmarks.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cd LinqRewrite
dotnet run ..\Tests\BenchmarksLibrary\BenchmarksLibrary.csproj ..\Tests\Rewritten
cd ..\Tests\Rewritten
dotnet run
dotnet run --configuration Release
pause
9 changes: 2 additions & 7 deletions Tests/BenchmarksLibrary/BenchmarksLibrary.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<LangVersion>latest</LangVersion>
<LangVersion>8.0</LangVersion>
<TieredCompilation>true</TieredCompilation>
<TargetFramework>net48</TargetFramework>
<TargetFramework>net462</TargetFramework>
<AssemblyVersion>1.0.0</AssemblyVersion>
<FileVersion>1.0.0</FileVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<Optimize>true</Optimize>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="LinqFaster">
<Version>1.0.0</Version>
Expand Down

0 comments on commit 9c8efd5

Please sign in to comment.