Click here to Skip to main content
15,909,822 members
Home / Discussions / C#
   

C#

 
QuestionHow to press a key with TranslateMessage Pin
Member 1305673426-Sep-19 1:42
Member 1305673426-Sep-19 1:42 
AnswerRe: How to press a key with TranslateMessage Pin
Richard Deeming26-Sep-19 2:02
mveRichard Deeming26-Sep-19 2:02 
GeneralRe: How to press a key with TranslateMessage Pin
Member 1305673426-Sep-19 2:10
Member 1305673426-Sep-19 2:10 
GeneralRe: How to press a key with TranslateMessage Pin
Richard Deeming26-Sep-19 2:14
mveRichard Deeming26-Sep-19 2:14 
AnswerRe: How to press a key with TranslateMessage Pin
OriginalGriff26-Sep-19 2:23
mveOriginalGriff26-Sep-19 2:23 
QuestionChanging many projects from AnyCPU to x64 Pin
Bernhard Hiller24-Sep-19 22:04
Bernhard Hiller24-Sep-19 22:04 
AnswerRe: Changing many projects from AnyCPU to x64 Pin
OriginalGriff24-Sep-19 22:29
mveOriginalGriff24-Sep-19 22:29 
GeneralRe: Changing many projects from AnyCPU to x64 Pin
harold aptroot24-Sep-19 23:33
harold aptroot24-Sep-19 23:33 
Bernhard Hiller wrote:
But compiling for 64bit only could allow for more compiler optimizations (or am I mistaken?), so I'd prefer to create 64bit executables.
Not really, the compiler doesn't do anything special, it just sets that flag on the binary (which can be modified later, by the way). What matters is the bitness at which the program actually runs. To the C# compiler, "optimization" means simple things such as using fewer temporary variables and branching directly on a condition instead of constructing a boolean out of it and then testing it, that sort of thing.

There are various optimizations that you can do though:
  • Drop 32bit versions of dependencies and drop the release that uses them. Sounds like that's the plan.
  • Write code that explicitly assumes pointers are 8 bytes (doesn't come up a lot in C# obviously, but you can do it).
  • In 32bit mode, FP math gets done with x87 instructions, occasionally this required some workarounds to deal with 80bit/64bit precision mismatches, all of that nonsense can be removed. Most projects didn't bother with this in the first place.
  • Boldly using System.Numerics.Vectors all over the place, which is fast (well, some parts of it are fast, definitely double check) in 64bit mode but worse than pointless in 32bit mode.
  • Using things from System.Runtime.Intrinsics with X64 in the name, such as System.Runtime.Intrinsics.X86.Sse.X64, without checking IsSupported and without fallback.

GeneralRe: Changing many projects from AnyCPU to x64 Pin
Bernhard Hiller25-Sep-19 0:11
Bernhard Hiller25-Sep-19 0:11 
AnswerRe: Changing many projects from AnyCPU to x64 Pin
jkirkerx25-Sep-19 13:47
professionaljkirkerx25-Sep-19 13:47 
AnswerRe: Changing many projects from AnyCPU to x64 Pin
Richard MacCutchan25-Sep-19 21:43
mveRichard MacCutchan25-Sep-19 21:43 
GeneralRe: Changing many projects from AnyCPU to x64 Pin
Bernhard Hiller26-Sep-19 21:43
Bernhard Hiller26-Sep-19 21:43 
GeneralRe: Changing many projects from AnyCPU to x64 Pin
harold aptroot27-Sep-19 23:35
harold aptroot27-Sep-19 23:35 
GeneralRe: Changing many projects from AnyCPU to x64 Pin
Bernhard Hiller29-Sep-19 21:48
Bernhard Hiller29-Sep-19 21:48 
AnswerRe: Changing many projects from AnyCPU to x64 Pin
AntGamble15-Oct-19 21:40
AntGamble15-Oct-19 21:40 
QuestionHow to properly close a JSON Post using RestSharp? Pin
mlong3024-Sep-19 13:25
mlong3024-Sep-19 13:25 
AnswerRe: How to properly close a JSON Post using RestSharp? Pin
BillWoodruff24-Sep-19 16:06
professionalBillWoodruff24-Sep-19 16:06 
QuestionLINQ: Remove first entry of groups in a list Pin
Mc_Topaz23-Sep-19 3:20
Mc_Topaz23-Sep-19 3:20 
AnswerRe: LINQ: Remove first entry of groups in a list Pin
OriginalGriff23-Sep-19 4:31
mveOriginalGriff23-Sep-19 4:31 
GeneralRe: LINQ: Remove first entry of groups in a list Pin
Mc_Topaz23-Sep-19 4:49
Mc_Topaz23-Sep-19 4:49 
GeneralRe: LINQ: Remove first entry of groups in a list Pin
OriginalGriff23-Sep-19 4:51
mveOriginalGriff23-Sep-19 4:51 
GeneralRe: LINQ: Remove first entry of groups in a list Pin
BillWoodruff23-Sep-19 5:47
professionalBillWoodruff23-Sep-19 5:47 
GeneralRe: LINQ: Remove first entry of groups in a list Pin
OriginalGriff23-Sep-19 5:50
mveOriginalGriff23-Sep-19 5:50 
GeneralRe: LINQ: Remove first entry of groups in a list Pin
BillWoodruff23-Sep-19 5:55
professionalBillWoodruff23-Sep-19 5:55 
GeneralRe: LINQ: Remove first entry of groups in a list Pin
OriginalGriff23-Sep-19 6:11
mveOriginalGriff23-Sep-19 6:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.