It is currently Sun Sep 24, 2017 3:02 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: HLT HLT HLT HLT after RET
PostPosted: Sat Aug 26, 2017 2:41 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Jan 12, 2004 11:40 pm
Posts: 746
Location: Okazaki, JAPAN
I made Nontallion ver8.72 this week. just technique is "HLT HLT HLT HLT after RET".

PB compiler option /commented
Code:
RET


just add HLT HLT HLT HLT
Code:
RET
HLT
HLT
HLT
HLT

and /REASM compiled.

on the Intel Haswell Skylake KabyLake cores
  • Improved Display quality
  • Improved Sound quality
  • Improved Process reliability

maybe... I think "Intel inside micro OP code don't run low energy optimize!"

Test Build utility
Code:
file$=OpenFileRequester("PB", "*.pb", "*.pb", 0)
dir$ = GetPathPart(file$)
DeleteFile(dir$+"PureBasic.asm")

If file$ And FileSize(file$)>0
  Compiler = RunProgram(#PB_Compiler_Home+"\Compilers\pbcompiler", Chr(34)+file$+Chr(34)+" /MMX /UNICODE /commented", dir$, #PB_Program_Open | #PB_Program_Read); *** 3
  dir$+"PureBasic.asm"
 
  ooos.i = 0
  Output$ = ""
  If Compiler
    While ProgramRunning(Compiler)
      If AvailableProgramOutput(Compiler)
        If ooos%2 = 1
          Output$ + ReadProgramString(Compiler) + Chr(13)
        Else
          Output$ + ReadProgramString(Compiler) + Space(2)         
        EndIf
        ooos + 1
      EndIf
    Wend
    Output$ + Chr(13) + Chr(13)
    Output$ + "Exitcode: " + Str(ProgramExitCode(Compiler))
   
    CloseProgram(Compiler) ; Close the connection to the program
  EndIf
Else
  MessageRequester("Error!", "There was an error creating the assembly code file.")
EndIf

Global NewList Buffer.s()

If ReadFile(2, dir$)
  While Eof(2)=0
    AddElement(Buffer())
    Buffer() = ReadString(2)
  Wend
  CloseFile(2)
EndIf

ForEach Buffer()
  If FindString(Buffer(), " RET")
    PreviousElement(Buffer())
    AddElement(Buffer()) : Buffer() = "FNOP"
    AddElement(Buffer()) : Buffer() = "FNOP"
    NextElement(Buffer()) ; RET
    AddElement(Buffer()) : Buffer() = "HLT"
    AddElement(Buffer()) : Buffer() = "HLT"
    AddElement(Buffer()) : Buffer() = "HLT"
    AddElement(Buffer()) : Buffer() = "HLT"
    AddElement(Buffer()) : Buffer() = "FNOP"
    AddElement(Buffer()) : Buffer() = "FNOP"
  EndIf
Next

; *** MOV to MOVNTI : disable CPU cache *** It is a bonus
;
; Global NS_Find_1.i, NS_Find_2.i, NS_Find_3.i, NS_Find_4.i, NS_Find_5.i
; ForEach Buffer()
;   NS_Find_1 = FindString(Buffer(), "MOV ")
;   If NS_Find_1
;     NS_Find_2 = FindString(Buffer(), "[PB_")
;     NS_Find_3 = FindString(Buffer(), ",")
;     If NS_Find_2>0 And NS_Find_3>0 And NS_Find_2<NS_Find_3
;       Buffer() = ReplaceString(Buffer(), "MOV", "MOVNTI")
;     EndIf
;   EndIf
; Next
;
; ForEach Buffer()
;   NS_Find_1 = FindString(Buffer(), "MOV ")
;   If NS_Find_1
;     NS_Find_2 = FindString(Buffer(), "[")
;     NS_Find_3 = FindString(Buffer(), ",")
;     NS_Find_5 = FindString(LCase(Buffer()), "qword")
;     If Not NS_Find_5
;       NS_Find_5 = FindString(LCase(Buffer()), "dword")
;     EndIf
;     NS_Find_4 = FindString(LCase(Buffer()), "a", NS_Find_3)
;     If Not NS_Find_4
;       NS_Find_4 = FindString(LCase(Buffer()), "b", NS_Find_3)
;     EndIf
;     If Not NS_Find_4
;       NS_Find_4 = FindString(LCase(Buffer()), "c", NS_Find_3)
;     EndIf
;     If Not NS_Find_4
;       NS_Find_4 = FindString(LCase(Buffer()), "d", NS_Find_3)
;     EndIf
;     If Not NS_Find_4
;       NS_Find_4 = FindString(LCase(Buffer()), "p", NS_Find_3)
;     EndIf
;     If Not NS_Find_4
;       NS_Find_4 = FindString(LCase(Buffer()), "i", NS_Find_3)
;     EndIf
;     If Not NS_Find_4
;       NS_Find_4 = FindString(LCase(Buffer()), "r8", NS_Find_3)
;     EndIf
;     If Not NS_Find_4
;       NS_Find_4 = FindString(LCase(Buffer()), "r9", NS_Find_3)
;     EndIf
;     If Not NS_Find_4
;       NS_Find_4 = FindString(LCase(Buffer()), "r10", NS_Find_3)
;     EndIf
;     If Not NS_Find_4
;       NS_Find_4 = FindString(LCase(Buffer()), "r11", NS_Find_3)
;     EndIf
;     If Not NS_Find_4
;       NS_Find_4 = FindString(LCase(Buffer()), "r12", NS_Find_3)
;     EndIf
;     If Not NS_Find_4
;       NS_Find_4 = FindString(LCase(Buffer()), "r13", NS_Find_3)
;     EndIf
;     If Not NS_Find_4
;       NS_Find_4 = FindString(LCase(Buffer()), "r14", NS_Find_3)
;     EndIf
;     If Not NS_Find_4
;       NS_Find_4 = FindString(LCase(Buffer()), "r15", NS_Find_3)
;     EndIf
;     If NS_Find_2>0 And NS_Find_3>0 And NS_Find_2<NS_Find_3 And NS_Find_5>0 And NS_Find_4>0
;       Buffer() = ReplaceString(Buffer(), "MOV", "MOVNTI")
;     EndIf
;   EndIf
; Next

CreateFile(2, dir$)
ForEach Buffer()
  WriteStringN(2, Buffer())
Next
FlushFileBuffers(2)
CloseFile(2)

ClearList(Buffer())
file$ = dir$
dir$ = GetPathPart(file$)

Compiler = RunProgram(#PB_Compiler_Home+"\Compilers\pbcompiler", Chr(34)+file$+Chr(34)+" /MMX /UNICODE /REASM /EXE "+Chr(34)+"Z:\TestBuild"+Str(Random(999999))+".exe"+Chr(34), dir$, #PB_Program_Open | #PB_Program_Read)
  If Compiler
    While ProgramRunning(Compiler)
      If AvailableProgramOutput(Compiler)
        Output2$ + ReadProgramString(Compiler) + Chr(13)
      EndIf
    Wend
    Output2$ + Chr(13) + Chr(13)
    Output2$ + "Exitcode: " + Str(ProgramExitCode(Compiler))
   
    CloseProgram(Compiler)
  EndIf

  MessageRequester("Output", Output$)
  MessageRequester("Output", Output2$)

_________________
My general site & Bug head technology - Ultimate high quality sound player by BASS
My facebook page.


Top
 Profile  
Reply with quote  
 Post subject: Re: HLT HLT HLT HLT after RET
PostPosted: Sat Aug 26, 2017 9:29 am 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2005 2:46 pm
Posts: 1676
Location: Pas-de-Calais, France
I think we need a fiable program to evaluate the advantages.

_________________
Prehistoric games - Bobble Puzzle, Purebreaker 3 ~> http://djes.free.fr


Top
 Profile  
Reply with quote  
 Post subject: Re: HLT HLT HLT HLT after RET
PostPosted: Sat Aug 26, 2017 9:46 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat May 05, 2007 5:31 pm
Posts: 352
Location: Linz, Austria
I'm curious... Do you have a small demo to see/hear the improvement?


Top
 Profile  
Reply with quote  
 Post subject: Re: HLT HLT HLT HLT after RET
PostPosted: Sat Aug 26, 2017 5:49 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Jan 12, 2004 11:40 pm
Posts: 746
Location: Okazaki, JAPAN
check condition
You can't feel the effect unless you are a city along the coast.
You can’t feel in the supply area of nuclear power generation.
You can't check the effect unless you get nervous.

PB Example : Gadget.pb
It makes parts easier to see sharp.

I use this technique at Nontallion 8.72, Affeine 3.25 and All core any cures 21.4.
It is a sound player for ASIO output with the most correct sound.
Bug head 8.60, All core any cures 20.8, Affeine 3.19, Windows x64 AVX2, Installer & Zip [August2017 08/24 AM1]
x64 SSE 4.1 limited version included "Bug head 8.60, Affeine 3.19, All core any cures 20.8", Zip only
x64 AVX 2.0 Hi-legacy version included "Nontallion 8.72, Affeine 3.25, All core any cures 21.4", Zip & Installer
http://oryaaaaa.world.coocan.jp/bughead/

It is a story that the register stability is deteriorated from excessive pursuit of power saving and it is affected at the part involving DA conversion.

_________________
My general site & Bug head technology - Ultimate high quality sound player by BASS
My facebook page.


Top
 Profile  
Reply with quote  
 Post subject: Re: HLT HLT HLT HLT after RET
PostPosted: Sat Aug 26, 2017 11:44 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Apr 30, 2009 5:23 pm
Posts: 179
Location: Côtes d'Azur, France
I Wonder if this is japanese sens of humour or if it's an automatic translation... Anyway, my city is on a coast so.... It makes me nervous :wink:

_________________
There are 2 methods to program bugless.
But only the third works fine.


Top
 Profile  
Reply with quote  
 Post subject: Re: HLT HLT HLT HLT after RET
PostPosted: Sun Aug 27, 2017 12:39 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 07, 2007 3:25 pm
Posts: 3122
Location: Berlin, Germany
oryaaaaa wrote:
I made Nontallion ver8.72 this week. just technique is "HLT HLT HLT HLT after RET".

PB compiler option /commented
Code:
RET


just add HLT HLT HLT HLT
Code:
RET
HLT
HLT
HLT
HLT

and /REASM compiled.

oryaaaaa wrote:
check condition
You can't feel the effect unless you are a city along the coast.
You can’t feel in the supply area of nuclear power generation.
You can't check the effect unless you get nervous.

Ahhh, I see. Now everything is as clear as mud. :mrgreen:

_________________
Please excuse my flawed English. My native language is PureBasic.
Search
RSBasic's backups


Top
 Profile  
Reply with quote  
 Post subject: Re: HLT HLT HLT HLT after RET
PostPosted: Sun Aug 27, 2017 9:39 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Aug 15, 2009 6:59 pm
Posts: 1216
oryaaaaa is known for his controversial codes for quality improvement of sound and such.

Either he is a genius and understands something about how the universe works, that i and many just don't.
Or it's just plain nonsense.


Top
 Profile  
Reply with quote  
 Post subject: Re: HLT HLT HLT HLT after RET
PostPosted: Sun Aug 27, 2017 11:33 pm 
Online
Addict
Addict
User avatar

Joined: Tue Oct 09, 2007 2:15 am
Posts: 842
Thorium wrote:
oryaaaaa is known for his controversial codes for quality improvement of sound and such.

Either he is a genius and understands something about how the universe works, that i and many just don't.
Or it's just plain nonsense.


Or the google translator is the greatest rubbish thing to translate from JAP to ENG...

_________________
PureBasic 5.45 LTS / 5.61 (Windows x86/x64) | Windows10 Pro x64 | Z87-PLUS | i7 4770k | 32GB RAM | iChill GeForce GTX 980 X4 Ultra | HAF XF Evo​​
English is not my native language...


Top
 Profile  
Reply with quote  
 Post subject: Re: HLT HLT HLT HLT after RET
PostPosted: Mon Aug 28, 2017 9:28 am 
Offline
Addict
Addict
User avatar

Joined: Sat Aug 15, 2009 6:59 pm
Posts: 1216
Bisonte wrote:
Or the google translator is the greatest rubbish thing to translate from JAP to ENG...

I don't think so.
We had some discussion prior to this one. He is serious.
There are even some theoretical possibilties to some of his claims. But it's mostly esoteric.

This discussion was interessting: www.purebasic.fr/english/viewtopic.php?f=12&t=64997


Top
 Profile  
Reply with quote  
 Post subject: Re: HLT HLT HLT HLT after RET
PostPosted: Mon Aug 28, 2017 9:36 am 
Offline
Addict
Addict

Joined: Mon Feb 16, 2015 2:49 pm
Posts: 950
oryaaaaa wrote:
You can't feel the effect unless you are a city along the coast.
You can’t feel in the supply area of nuclear power generation.
You can't check the effect unless you get nervous.

Okay, now I'm convinced. This says it all.


Top
 Profile  
Reply with quote  
 Post subject: Re: HLT HLT HLT HLT after RET
PostPosted: Wed Aug 30, 2017 3:58 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Mar 02, 2013 9:17 am
Posts: 592
Snake Oil

_________________
http://www.nachtoptik.de
BucketFill advanced -GFX FOR IMAGES & CANVAS: http://www.purebasic.fr/english/viewtopic.php?f=12&t=66927
QUICK-AES-256 -SUITE & DLL/SO & RSA: http://www.purebasic.fr/english/viewtopic.php?f=27&t=60507


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye