This repository was archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 174
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
Improve build time for Q# hello world application #436
Copy link
Copy link
Open
Labels
enhancementNew request or suggestion for an improvementNew request or suggestion for an improvementperformanceSpeed or optimization problemSpeed or optimization problem
Description
Describe the enhancement request
Currently hello world sample takes around 7 times longer for Q# project to compile than for C# project.
To Reproduce
Run the following PowerShell script to reproduce:
function time-hello {
param( [String]$language, [String]$project )
Write-Host "****************"
Write-Host "Creating hello-world console project: 'dotnet new console -n $project -lang $language"
start-process dotnet "new console", "-n $project", "-lang $language" -Wait -WindowStyle Hidden
Set-Location "./$project"
Write-Host "Running 'dotnet restore' for $language console project"
start-process dotnet -argumentlist "restore" -Wait -WindowStyle Hidden
Write-Host "Measuring 'dotnet build --no-restore' for $language console project"
Measure-Command `
{start-process dotnet -argumentlist "build", "--no-restore" -Wait -WindowStyle Hidden} `
| Out-String -Stream `
| Select-String "TotalSeconds"
Set-Location ..
Write-Host "Deleting $language project directory"
Remove-Item -r "./$project"
Write-Host " "
}
Write-Host "****************"
Write-Host "System info:"
dotnet --info | Select-String ".NET Core" -Context 0,4
Write-Host "****************"
Write-Host "QDK info:"
dotnet new -u | Select-String Quantum -Context 0,4
time-hello "Q#" "qs-hello"
time-hello "C#" "cs-hello"
Expected behavior
Given that Q# is transpiled into C# and Q# is much simpler programming language than C#, I would expect Q# project to take at most two times longer to build.
Actual behavior
Currently hello world sample takes around 7 times longer for Q# project to compile than for C# project, which is 14 seconds on a performant machine.
System information
- OS: Windows
- .NET Core Version: 3.1.201
- Build is run on a dedicated SSD Samsung SSD 960 EVO 500 GB, separate from the SSD on which Windows is installed
- CPU: Intel(R) Core(TM) i7-7700T CPU @ 2.90GHz set to full performance
- 32 GB RAM
Additional context
martinquantum and msoeken
Metadata
Metadata
Assignees
Labels
enhancementNew request or suggestion for an improvementNew request or suggestion for an improvementperformanceSpeed or optimization problemSpeed or optimization problem