- 2021 Wish List - 1 Update
- [Jesus Loves You] Time is approaching - 12 Updates
- Strange compiler warning... - 5 Updates
- Why is trunc() so slow ? - 6 Updates
- Halting Problem Final Conclusion [2021 update to my 2004 statement] - 1 Update
Marcel Mueller <news.5.maazl@spamgourmet.org>: Jan 04 07:00PM +0100 Am 04.01.21 um 17:24 schrieb Scott Lurndal: > I wish that the regulars in this group would simply add BW and RCH to > their killfiles and stop responding to their nonsense. Resist the > temptation, please. Adjust /your/ killfile. => Ignore sub thread instead of just ignore. Marcel |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jan 03 06:36PM -0500 On 1/3/21 12:58 PM, Rick C. Hodgin wrote: > It's dangerous to blindly accept what those people in power want to give > you. It's worth being cautious, and waiting if you are not in a high > health risk group, which most of us aren't. Note: The words above are cautionary. Be careful. Think. ----- I went out to the grocery tonight. It's about 6:30 pm here in Indiana. And the people were terrified. Nobody would look other people in the eye. They were avoiding them like the plague. There wasn't even courteous head bobs and what not between people. Everybody was in full isolation mode, and nobody save the smallest handful of people who you could see it in their eyes, had friendliness, or love, or common courtesy in their dealings with people. Over the probably 200 people I encountered in the store, 3 were friendly and cordial. This world is being transformed by fear into the world that will receive the mark of the beast during the tribulation. https://www.biblegateway.com/passage/?search=2%20Timothy%201:7&version=KJV 7 For God hath not given us the spirit of fear; but of power, and of love, and of a sound mind. It's one thing to be cautious, social distance, wear your mask. It's another thing entirely to lose all semblance of human kindness toward one another. I've never seen such a thing in my 51 years on this planet. > 2) Everybody will face judgment > 3) Everybody needs Jesus > 4) Jesus offers forgiveness for sin for free to everybody I don't many days, weeks, months, years are ahead for Christians on this planet before the rapture. My money is on a date before May 14, 2021, but I don't know what day. Everything is accelerating world-wide toward the one world government system, and that "revving up" is one of the signs that when we see all these things together at the same time, and they're getting faster and faster, Jesus likens it to a woman in labor, the labor pains grow in frequency and intensity until ... delivery. Repeat these words before it's too late: "Dear Heavenly Father, I have sinned. I am guilty before you. I need a Savior, and I ask you to forgive my sin through the sacrifice of your Son Jesus on the cross. I ask you to cleanse me of my sin by His righteous blood shed for me. I believe that He died, was buried, and on the third day resurrected and is alive today, seated at the right hand of power and glory. Amen." Nobody wants to be here on this Earth for what's coming. For most world-wide, Revelation teaches it will be their terminal end because the anti-Christ spirit that rises up corrupts everything, resulting in destruction of everything. Jesus even says if those final days weren't cut short, no flesh would survive. Not just people, but all flesh, animals, plants, birds, fish, and people. "Board the ark" of Jesus Christ. Save yourself from the coming destruction. -- Rick C. Hodgin |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jan 03 07:27PM -0500 On 1/3/21 6:36 PM, Rick C. Hodgin wrote: > courtesy in their dealings with people. > Over the probably 200 people I encountered in the store, 3 were friendly > and cordial. One other thing to note. This was probably encouraged by the PA system which sounded like a disaster warning. "Shoppers are required to wear masks at all times. You will not be able to remain in the store without your mask." We're all being trained, people. The enemy is teaching you all unaware that the mark of the beast is the only way to move forward. I'm going to teach you the truth here: 1) Everyone who takes the mark of the beast is eternally damned. 2) The mark will be something on your right-hand or forehead. 3) Nobody world-wide will be able to buy or sell unless they have the mark. 4) This will require strong faith to not take it. 5) God promises all who do not take it for His sake will be saved, though they'll likely have to die (or be killed) for their faith. Here are the Bible verses which back that up. The relevant portions are highlighted with a ==>: Revelation 13 https://www.biblegateway.com/passage/?search=Revelation%2013&version=KJV;NASB 1 And I stood upon the sand of the sea, and saw a beast rise up out of the sea, having seven heads and ten horns, and upon his horns ten crowns, and upon his heads the name of blasphemy. 2 And the beast which I saw was like unto a leopard, and his feet were as the feet of a bear, and his mouth as the mouth of a lion: and the dragon gave him his power, and his seat, and great authority. 3 And I saw one of his heads as it were wounded to death; and his deadly wound was healed: and all the world wondered after the beast. 4 And they worshipped the dragon which gave power unto the beast: and they worshipped the beast, saying, Who is like unto the beast? who is able to make war with him? If you watch the DTBM channel on YouTube, you can find teachings about what all of these symbols mean. DTBM = Discover The Book Ministries, John Barnett, an excellent Biblical scholar and teacher. 5 And there was given unto him a mouth speaking great things and blasphemies; and power was given unto him to continue forty and two months. 6 And he opened his mouth in blasphemy against God, to blaspheme his name, and his tabernacle, and them that dwell in heaven. ==> 7 And it was given unto him to make war with the saints, and to overcome them: and power was given him over all kindreds, and tongues, and nations. ==> 8 And all that dwell upon the earth shall worship him, whose names are not written in the book of life of the Lamb slain from the foundation of the world. 9 If any man have an ear, let him hear. All whose names are not written in the Lamb's Book of Life (Jesus' book of life) will worship the beast. Those who are written in the Lamb's Book of Life are those who are saved, and they will not worship the beast. 10 He that leadeth into captivity shall go into captivity: he that killeth with the sword must be killed with the sword. Here is the patience and the faith of the saints. 11 And I beheld another beast coming up out of the earth; and he had two horns like a lamb, and he spake as a dragon. 12 And he exerciseth all the power of the first beast before him, and causeth the earth and them which dwell therein to worship the first beast, whose deadly wound was healed. 13 And he doeth great wonders, so that he maketh fire come down from heaven on the earth in the sight of men, There will be supernatural events happening during this time, but you must not be deceived. The power of these supernatural events is not of God, but of the enemy of God. It's purpose is to deceive people with awe and wonder into believing in him, rather than in God. You must reject this. 14 And deceiveth them that dwell on the earth by the means of those miracles which he had power to do in the sight of the beast; saying to them that dwell on the earth, that they should make an image to the beast, which had the wound by a sword, and did live. 15 And he had power to give life unto the image of the beast, that the image of the beast should both speak, and cause that as many as would not worship the image of the beast should be killed. ==> 16 And he causeth all, both small and great, rich and poor, free and bond, to receive a mark in their right hand, or in their foreheads: "In their right hand, or in their foreheads." That's the mark. And it's associated with his name, or the number of his name. That's the tell as to what the mark is. And it will be a conscious choice given to people. You won't be deceived into taking it thinking it's a flu vaccine or something. You'll know what it is, and you'll make a conscious choice. The DTBM channel talks about a practice like this that took place back in Rome. A line would form, and people would have to grab some incense and rub it between their fingers as they poured it out over a flame and give an acknowledgement that Caesar has all power "Caesar dios" I believe is what they had to say in their language. All who did this had their life spared. Those who did not were taken off and burned alive literally. Most thought, "It's no big deal. No one I know is here with me in line. I can just say the words under my breath and live another year." But God knew their heart, and what they were saying, and not saying. It is this same type of thing that will be there with this choice. God will know, and all who take the mark will be damned. There is then no opportunity a day or week later to repent and undo it. All who take the mark are eternally damned to Hellfire. ==> 17 And that no man might buy or sell, save he that had the mark, or the name of the beast, or the number of his name. ==> 18 Here is wisdom. Let him that hath understanding count the number of the beast: for it is the number of a man; and his number is Six hundred threescore and six. There will be something which aligns with 666 for this mark. You must follow the devout saints of God and look for the consensus among them. There are always fringe elements who say this or that, but God's Holy Spirit is not isolated to small groups. He guides through the multitude, and His whole church is moved by Him together, so that the people are moved to pray together, fast together, have common and shared beliefs, etc. The next portion about all who take the mark are damned comes from another chapter: Revelation 14 https://www.biblegateway.com/passage/?search=Revelation%2014&version=KJV;NASB 1 And I looked, and, lo, a Lamb stood on the mount Sion, and with him an hundred forty and four thousand, having his Father's name written in their foreheads. 2 And I heard a voice from heaven, as the voice of many waters, and as the voice of a great thunder: and I heard the voice of harpers harping with their harps: 3 And they sung as it were a new song before the throne, and before the four beasts, and the elders: and no man could learn that song but the hundred and forty and four thousand, which were redeemed from the earth. 4 These are they which were not defiled with women; for they are virgins. These are they which follow the Lamb whithersoever he goeth. These were redeemed from among men, being the firstfruits unto God and to the Lamb. 5 And in their mouth was found no guile: for they are without fault before the throne of God. It is believed these 144,000 will be Jews who become the new Christians after the rapture, as they will be filled with the Holy Spirit as born again believers are. But during this time, it will be more, because of a prophesy in Joel that says God will pour out His spirit upon all flesh in those days, and people will have visions and dreams. ==> 6 And I saw another angel fly in the midst of heaven, having the everlasting gospel to preach unto them that dwell on the earth, and to every nation, and kindred, and tongue, and people, ==> 7 Saying with a loud voice, Fear God, and give glory to him; for the hour of his judgment is come: and worship him that made heaven, and earth, and the sea, and the fountains of waters. The beast system will not endure. This happens during the tribulation, but the system that will provide you the mark of the beast to buy or sell will not endure. What will endure, even beyond the grave, is Jesus Christ, the power of His redemptive blood, and all who put their faith and trust in Him have eternity in Heaven with God. Those who took the mark, eternity in Hell in the flames. It is the equivalent of "a lifetime sentence without the possibility of parole" for an eternal being of unimaginable power and ability, of which we all are, for we are called "gods" (literally) in the Psalms, which Jesus also affirms (John 10:34, Psalm 82:6). This is what the enemy tries to prevent us from achieving. He tries to get us to focus on stuff here in this world so we miss the true nature of who we are. God has created us as special beings among all His creation, made in His own image and likeness (Genesis 1-3), prepared for us a future that is amazing, dwelling in the place God would create for Himself, a place of beauty, of power, of grand majesty, described by Jesus as a paradise. Don't let the enemy steal that away from you by keeping you from acknowledging your sin and asking forgiveness from Jesus so that you too can be saved, and enter into that Kingdom prepared for you. 8 And there followed another angel, saying, Babylon is fallen, is fallen, that great city, because she made all nations drink of the wine of the wrath of her fornication. And here is the eternal destruction of those with the mark: ==> 9 And the third angel followed them, saying with a loud voice, If any man worship the beast and his image, and receive his mark in his forehead, or in his hand, ==> 10 The same shall drink of the wine of the wrath of God, which is poured out without mixture into the cup of his indignation; and he shall be tormented with fire and brimstone in the presence of the holy angels, and in the presence of the Lamb: ==> 11 And the smoke of their torment ascendeth up for ever and ever: and they have no rest day nor night, who worship the beast and his image, and whosoever receiveth the mark of his name. Faith brings patience: 12 Here is the patience of the saints: here are they that keep the commandments of God, and the faith of Jesus. ==> 13 And I heard a voice from heaven saying unto me, Write, Blessed are the dead which die in the Lord from henceforth: Yea, saith the Spirit, that they may rest from their labours; and their works do follow them. 14 And I looked, and behold a white cloud, and upon the cloud one sat like unto the Son of man, having on his head a golden crown, and in his hand a sharp sickle. 15 And another angel came out of the temple, crying with a loud voice to him that sat on the cloud, Thrust in thy sickle, and reap: for the time is come for thee to reap; for the harvest of the earth is ripe. 16 And he that sat on the cloud thrust in his sickle on the earth; and the earth was reaped. 17 And another angel came out of the temple which is in heaven, he also having a sharp sickle. 18 And another angel came out from the altar, which had power over fire; and cried with a loud cry to him that had the sharp sickle, saying, Thrust in thy sharp sickle, and gather the clusters of the vine of the earth; for her grapes are fully ripe. 19 And the angel thrust in his sickle into the earth, and gathered the vine of the earth, and cast it into the great winepress of the wrath of God. 20 And the winepress was trodden without the city, and blood came out of the winepress, even unto the horse bridles, by the space of a thousand and six hundred furlongs. 2,600 furlongs is approximately 325 miles. > animals, plants, birds, fish, and people. > "Board the ark" of Jesus Christ. Save yourself from the coming > destruction. Jesus gives us every opportunity to come to Him. He calls out to us from within. He sends men and women like me out into the world to teach people to warn them of their sin, their need of salvation, to warn of what's coming unto the whole Earth. Judgment will come for everybody, and everybody will be without excuse when the evidence of their life is presented. It will be like a 4D hologram from birth to death being replayed. It will show every decision, every action, things done in public, things done in secret. All of it will be 100% revealed before the court of God, where every soul who was not saved (by the Lamb, by Jesus and His death, burial, and resurrection, by His blood) will be judged. Those who are saved by the Lamb have all of their misdeeds transferred to Jesus at the cross, and those deeds died with Him once and for all. He became the murderer. He became the adulterer. He became the liar. He became the thief. He became every sin we've ever done in our place, so that we could be set free. It's who Jesus is. It's why He came to the Earth as a man, and died on the cross as He did. He did it to set the many free who would believe in Him, to rescue us from the judgment of God. He becomes our sin. We become His spotless righteousness. Consider these things. Ponder on them. Think of them in the car. Talk them over with yourself in the mirror when you are alone, without the radio or TV or other distraction. Call out to God and ask Him to reveal these things to you so you too can know the truth, and that truth will make you free. I love you. I teach you the truth. I warn you of what's coming because I do not want you to go through it. I want you to escape it by putting your faith and trust in Jesus Christ today, right now, this instant, so that when the rapture comes, or when we leave this world by death, we are already set free and alive forever having been redeemed by Jesus at the cross. Peace to each of you. There is victory at the cross. -- Rick C. Hodgin |
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Jan 03 05:14PM -0800 On 1/3/2021 3:36 PM, Rick C. Hodgin wrote: > courtesy in their dealings with people. > Over the probably 200 people I encountered in the store, 3 were friendly > and cordial. [...] Did you try to talk to 200 people in the store? Or, were you just looking at their eyes? |
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Jan 03 05:18PM -0800 On 1/3/2021 4:27 PM, Rick C. Hodgin wrote: > 1) Everyone who takes the mark of the beast is eternally damned. > 2) The mark will be something on your right-hand or forehead. >[...] You are RADIALLY misinterpreting the bible here. Sorry. |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jan 03 11:26PM -0500 Many of you may have become so tangled up in societal guidance on how to live and be that you've lost sight of what the Biblical teaching is and why it's important. Here's an excellent sermon by an excellent Biblical scholar teacher (John Barnett). He teaches the truth of the Bible without making you feel guilty, but more as a teacher teaching knowledge. The teaching helps you understand the disparity that exists between where you might be right now, and where God calls you to be in this world. And as always, it's a calling back to Him with full forgiveness awaiting. No judgment. No shame. It's expected that people in this world will do things contrary to God's will until they come to knowledge of God, which is something that happens on the inside. Barnett says Christianity's not paint. It's not a coating. It permeates. God does the work of cleaning up a person's life. We first come to Him acknowledging that we're broken because of sin. He fixes us, and then He begins restoring us to what He would have us be in this world. The things you've gone through are unique. You could reach people I could never reach. God works with all of us pulling together to be a part of His Kingdom. True Citizens of Heaven Have Biblical Convictions https://www.youtube.com/watch?v=ZVtHRwwH-HM ----- The following content is to consider again after you've watched the sermon. Please post any questions. And remember this: You are so deeply loved. It's why God sends men and women like me to remind you of Him. You won't hear about Him in the world, because this world is perishing. You will hear about life from those who bring life, which are those who point the way to Jesus because He is that life. Even life eternal. On 1/3/21 7:27 PM, Rick C. Hodgin wrote: -- Rick C. Hodgin |
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Jan 03 08:30PM -0800 On 1/3/2021 8:26 PM, Rick C. Hodgin wrote: > Many of you may have become so tangled up in societal guidance on how to > live and be that you've lost sight of what the Biblical teaching is and > why it's important. [...] The mark of the beast is in your head. Are you going to listen to the devil? The mark of the beast is not a mark on your hand, or anything like that. |
Juha Nieminen <nospam@thanks.invalid>: Jan 04 07:23AM >> vaccine. Elderly people have died within two hours of getting the >> vaccine. So far they say it's unrelated. But also many people of all >> ages have gotten demonstrably sick after taking it. You are a spammer, a conspiracy theorist, a liar, an asshole and a complete hypocrite who doesn't even follow the very scriptures you are trying to impose onto other people. Even your god, if he existed, would be disgusted by you. The more you write about your religion, the more disgusted I am of it. You are having the exact opposite effect of what you want. You are driving people away from your religion, not towards it. And no, your words do not work as a magical incantation that will somehow make your god act upon people, like you probably believe. They only make people angry and disgusted towards you, because you are nothing but a spammer and a hypocrite. |
David Brown <david.brown@hesbynett.no>: Jan 04 08:32AM +0100 On 04/01/2021 00:36, Rick C. Hodgin wrote: <snip dangerous conspiracy theories> Rick, it is one thing to espouse your religious theories. If you think your particular beliefs will give you a better life, or some kind of "life after death", that's up to you. But do /not/ spread conspiracy theories about real-life serious matters that are completely beyond your understanding. Vaccines are a necessary inconvenience - the alternative is people dying or suffering unnecessarily from this pandemic, and they are the only way to get back to some semblance of normality in society. Listen to whatever crackpot internet poster and youtuber you want in regards to your religious beliefs. Listen to your /doctor/ for medical advice. Follow the advice of the appropriate health authorities on the need for masks, testing and other precautions and preventative measures. Follow their advice about vaccines. Do not encourage others to endanger their healths and the healths of people around them on the basis of misinformation and wild conspiracy theories. (This is not an invitation to discussion - it is a counter to potentially dangerous postings. I know Rick will not read or heed anything I post. If anyone else feels they want to discuss vaccines and the current pandemic seriously, my email address is valid. Or they can look up the WHO website, their country's health authority's website, or talk to a doctor.) |
Ben Bacarisse <ben.usenet@bsb.me.uk>: Jan 04 10:13AM > In comp.lang.c++ Rick C. Hodgin <rick.c.hodgin@gmail.com> wrote: >> On 1/3/21 12:58 PM, Rick C. Hodgin wrote: <spam> > You are a spammer, No, it's worse. Most Usenet spam is sent automatically, but RCH responds, so replies exacerbate the problem. With ordinary spam, replying with quotes, as you have done, simply increases its visibility by showing it to people whose filters had removed it. I know there is a logical conundrum with my replying to you at all about not replying to off-topic posts, but I promise I will do this only once! -- Ben. |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jan 04 08:19AM -0500 On 1/4/21 2:23 AM, Juha Nieminen wrote: > work as a magical incantation that will somehow make your god act upon > people, like you probably believe. They only make people angry and disgusted > towards you, because you are nothing but a spammer and a hypocrite. God word works two ways for people: 1) Toward salvation for those being saved 2) As a witness against those who are not being saved The flesh is at war with the things of God. It is only in the spirit, in the new birth, in the new life, that the things of God can be seen and received, which is why it takes a supernatural act of God to draw those who will believe to salvation. No man gets there alone. God examines the heart and knows if a person will seek the truth and believe, and for all who will He steps in to their life and pours out spiritually upon them, which is that very act which makes it possible for a raging sinner yesterday, to become a believer in Jesus Christ today. A new man is born in salvation. The old passes away. The new is forevermore. -- Rick C. Hodgin |
Mr Flibble <flibble@i42.REMOVETHISBIT.co.uk>: Jan 04 05:25PM On 04/01/2021 00:27, Rick C. Hodgin wrote: >> Over the probably 200 people I encountered in the store, 3 were friendly and cordial. > One other thing to note. This was probably encouraged by the PA system which sounded like a disaster warning. "Shoppers are required to wear masks at all times. You will not be able to remain in the store without your mask." > We're all being trained, people. The enemy is teaching you all unaware that the mark of the beast is the only way to move forward. And Satan invented fossils, yes? Spammer? [snip - tl;dr] /Flibble -- π |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jan 04 12:36PM -0500 On 1/4/21 12:25 PM, Mr Flibble wrote: > And Satan invented fossils, yes? And Satan's convinced his people to be mindless gainsayers, yes? > Spammer? No. The things I post are wake up calls for those who are not following after what they should. Why is it "what they should"? Because every last one of us will leave this world at some point. There is a future after we leave this world. We will go on in our own consciousness. We will be aware of things then we cannot know today due to our being confined to this temporal existence. But we were not made temporal. We have been made in the image and likeness of God. We are eternal beings of incredible power and ability. It's why Satan is trying to destroy us by convincing us there's nothing more than this world. Satan lies, and he causes people who don't seek the truth to believe his lies as though they were truth. But for everyone who presses in and seek the truth, God Himself reveals truth to them. > [snip - tl;dr] Your choice. Your peril, Leigh. There is wisdom in the things I post, even if you find it only in the scripture verses I post and not my summary of them. -- Rick C. Hodgin |
spuddy@isnotyourbuddy.co.uk: Jan 03 05:22PM On Sun, 3 Jan 2021 09:09:00 -0800 (PST) >> And also brings nothing to the table when dealing with fixed sized arrays >> where no bounds checking needs to be done except probably binary bloat. >The raw array brings nothing to table. Nothing. Have to Bringing something to the table implies something more than already existed. The raw array is what already existed so by definition it wouldn't. >lose the size information or to use that uint8_t (*foo)[42] crap to pass >reference to it or have to wrap it into struct to pass by value. If done so >there are still no advantages, still as error-prone and ugly as it was. A MAC is fixed size, it NEVER changes. There is no need for anything other than a C array. >it and want others to have same pain. IOW sadism of pathetic asshole. Ad homenim - the last resort of someone with no argument. Nice going. Oh, and its spelt ARSEhole unless you're speaking in the american dialect. |
Juha Nieminen <nospam@thanks.invalid>: Jan 04 07:13AM > there are still no advantages, still as error-prone and ugly as it was. > Only excuse of advocating its usage is that you had the pain of using > it and want others to have same pain. IOW sadism of pathetic asshole. If you need a two-dimensional array, is it guaranteed that there will be no padding between the sub-arrays? With inbuilt arrays there is such a guarantee. |
spudisnotyourbud@grumpysods.com: Jan 04 09:25AM On Sun, 3 Jan 2021 09:44:02 -0800 (PST) >> The raw array is what already existed so by definition it wouldn't. >So there are no reasons to return to it ever as it has no advantages whatso= >ever. It has no disadvantages in this instance either and will probably produce a smaller binary. >> a C array. >Compiler has no concept of MAC. The std::array is in every sense as good or >better array than C array, also for MAC. Why is it better for a MAC where bound checking won't be required? Show me what I've missed. >You failed to show any other motivation of pushing inferior choice so I=20 >guessed correctly? =F0=9F=98=80 OK I can call you "pathetic arsehole" if yo= >u so wish. Pange see oma ajudeta baltlaste idikas sisse. |
spudisnotyourbud@grumpysods.com: Jan 04 09:28AM On 3 Jan 2021 18:13:31 GMT > "why?": as far as I'm concerned, std::array is (since 2011) the > default tool for fixed-size arrays. It's the /other/ solutions that > need a motivation. When you actually have an answer get back to me. |
Ben Bacarisse <ben.usenet@bsb.me.uk>: Jan 04 01:10PM >> it and want others to have same pain. IOW sadism of pathetic asshole. > If you need a two-dimensional array, is it guaranteed that there will be no > padding between the sub-arrays? The elements (in this case the sub-arrays) are guaranteed to be stored contiguously in that &a[n] = &a[0] + n for all valid n. Therefore there can't be any padding between the elements added simply because the sub-arrays are in a containing array, but I can't find any guarantee that sizeof (std::array<T, N>) == N * sizeof (std::array<T, N>::value_type) I.e. there may be padding at the end of a std::array (included in its size) and therefore padding in some sense "between" the sub-arrays in a std::array<std::array<T, N>, M>. -- Ben. |
Bonita Montero <Bonita.Montero@gmail.com>: Jan 03 06:44PM +0100 I've just wondered why trunc() of the MSVCRT is so slow. So I've written my own trunc(): #include <iostream> #include <cmath> #include <cassert> #include <limits> #include <vector> #include <random> #include <chrono> #include <cassert> using namespace std; using namespace chrono; double ftrunc( double d ); float ftrunc( float f ); int main() { union { double dAssemble; struct { uint64_t mantissa : 52; uint64_t exponent : 11; uint64_t sign : 1; }; }; mt19937_64 rg; uniform_int_distribution<uint64_t> mantissaValues( 0, ((uint64_t)1 << 52) - 1 ); // equal of only fractional numbers, // mantissa with integral parts and fractions // and mantissa without fractions uniform_int_distribution<unsigned> exponentValues( 0x3FF - 52, 0x3FF + 2 * 52 - 1 ), signValues( 0, 1 ); vector<double> vd( 1'000 ); for( double &d : vd ) mantissa = mantissaValues( rg ), exponent = exponentValues( rg ), sign = signValues( rg ), d = dAssemble; for( double d : vd ) assert(ftrunc( d ) == trunc( d )); double volatile dummyValue; time_point<high_resolution_clock> start = high_resolution_clock::now(); size_t const turns = 1'000'000'000 / vd.size(); for( size_t i = turns; i; --i ) for( double d : vd ) dummyValue = ftrunc( d ); double ns = (double)duration_cast<nanoseconds>( high_resolution_clock::now() - start ).count(); cout << "ftrunc: " << ns / (vd.size() * turns) << endl; start = high_resolution_clock::now(); for( size_t i = turns; i; --i ) for( double d : vd ) dummyValue = trunc( d ); ns = (double)duration_cast<nanoseconds>( high_resolution_clock::now() - start ).count(); cout << "trunc: " << ns / (vd.size() * turns) << endl; } double ftrunc( double d ) { static_assert(sizeof(double) == sizeof(uint64_t), "sizeof(double) not equal to sizeof(uint64_t)"); static_assert(numeric_limits<double>::is_iec559, "double must be IEEE-754"); // assume size_t is our CPU's native register-width static_assert(sizeof(size_t) == sizeof(uint64_t) || sizeof(size_t) == sizeof(uint32_t), "register-width must be 32 or 64 bit"); if constexpr( sizeof(size_t) == sizeof(uint64_t) ) // we have 64 bit registers { unsigned const MANTISSA_BITS = 52, EXP_BIAS = 0x3FF, INF_NAN_BASE = 0x7FF; uint64_t const EXP_MASK = (uint64_t)0x7FF << MANTISSA_BITS, SIGN_MASK = (uint64_t)0x800 << MANTISSA_BITS , MIN_INTEGRAL_DIGITS_EXP = (uint64_t) EXP_BIAS << MANTISSA_BITS, MIN_INTEGRAL_ONLY_EXP = (uint64_t)(EXP_BIAS + MANTISSA_BITS) << MANTISSA_BITS, INF_NAN_EXP = (uint64_t)INF_NAN_BASE << MANTISSA_BITS, NEG_MANTISSA_MASK = 0x000FFFFFFFFFFFFFu; union { double du; uint64_t dx; }; du = d; uint64_t exp = dx & EXP_MASK; if( exp >= MIN_INTEGRAL_DIGITS_EXP ) // value has integral digits if( exp < MIN_INTEGRAL_ONLY_EXP ) { // there are fraction-digits to mask out, mask them unsigned shift = (unsigned)(exp >> MANTISSA_BITS) - EXP_BIAS; dx &= ~(NEG_MANTISSA_MASK >> shift); return du; } else if( exp < INF_NAN_EXP ) // value is integral return du; else // infinite, NaN, SNaN // raise exception on SNaN if necessary return du + du; else { // below +/-1.0 // return +/-0.0 dx &= SIGN_MASK; return du; } } else if constexpr( sizeof(size_t) == sizeof(uint32_t) ) // we have 32 bit registers { unsigned const MANTISSA_BITS = 52, HI_MANTISSA_BITS = 20, EXP_BIAS = 0x3FF, INF_NAN_BASE = 0x7FF; uint32_t const EXP_MASK = (uint32_t)0x7FFu << HI_MANTISSA_BITS, SIGN_MASK = (uint32_t)0x800u << HI_MANTISSA_BITS, MIN_INTEGRAL_DIGITS_EXP = (uint32_t) EXP_BIAS << HI_MANTISSA_BITS, MAX_INTEGRAL32_EXP = (uint32_t)(EXP_BIAS + HI_MANTISSA_BITS) << HI_MANTISSA_BITS, MIN_INTEGRAL_ONLY_EXP = (uint32_t)(EXP_BIAS + MANTISSA_BITS) << HI_MANTISSA_BITS, INF_NAN_EXP = (uint32_t)INF_NAN_BASE << HI_MANTISSA_BITS, NEG_HI_MANTISSA_MASK = 0x000FFFFFu, NEG_LO_MANTISSA_MASK = 0xFFFFFFFFu; union { double du; struct { uint32_t dxLo; uint32_t dxHi; }; }; du = d; uint32_t exp = dxHi & EXP_MASK; if( exp >= MIN_INTEGRAL_DIGITS_EXP ) // value has integral digits if( exp < MIN_INTEGRAL_ONLY_EXP ) // there are fraction-digits to mask out if( exp <= MAX_INTEGRAL32_EXP ) { // the fraction digits are in the upper dword, mask them and zero the lower dword unsigned shift = (unsigned)(exp >> HI_MANTISSA_BITS) - EXP_BIAS; dxHi &= ~(NEG_HI_MANTISSA_MASK >> shift); dxLo = 0; return du; } else { // the fraction digits are in the lower dword, mask them unsigned shift = (unsigned)(exp >> HI_MANTISSA_BITS) - EXP_BIAS - HI_MANTISSA_BITS; dxLo &= ~(NEG_LO_MANTISSA_MASK >> shift); return du; } else if( exp < INF_NAN_EXP ) // value is integral return du; else // infinite, NaN, SNaN // raise exception on SNaN if necessary return du + du; else { // below +/-1.0 // return +/-0.0 dxHi &= SIGN_MASK; dxLo = 0; return du; } } } float ftrunc( float f ) { static_assert(sizeof(float) == sizeof(uint32_t), "sizeof(float) not equal to sizeof(uint32_t)"); static_assert(numeric_limits<float>::is_iec559, "float must be IEEE-754"); unsigned const MANTISSA_BITS = 23, EXP_BIAS = 0x7F, INF_NAN_BASE = 0xFF; uint32_t const EXP_MASK = (uint32_t)0xFF << MANTISSA_BITS, SIGN_MASK = (uint32_t)0x100 << MANTISSA_BITS , MIN_INTEGRAL_DIGITS_EXP = (uint32_t) EXP_BIAS << MANTISSA_BITS, MIN_INTEGRAL_ONLY_EXP = (uint32_t)(EXP_BIAS + MANTISSA_BITS) << MANTISSA_BITS, INF_NAN_EXP = (uint32_t)INF_NAN_BASE << MANTISSA_BITS, NEG_MANTISSA_MASK = 0x007FFFFFu; union { float fu; uint32_t fx; }; fu = f; uint32_t exp = fx & EXP_MASK; if( exp >= MIN_INTEGRAL_DIGITS_EXP ) // value has integral digits if( exp < MIN_INTEGRAL_ONLY_EXP ) { // there are fraction-digits to mask out, mask them unsigned shift = (unsigned)(exp >> MANTISSA_BITS) - EXP_BIAS; fx &= ~(NEG_MANTISSA_MASK >> shift); return fu; } else if( exp < INF_NAN_EXP ) // value is integral return fu; else // infinite, NaN, SNaN // raise exception on SNaN if necessary return fu + fu; else { // below +/-1.0 // return +/-0.0 fx &= SIGN_MASK; return fu; } } With 32 bit code my ftrunc is 1,9 times as fast in my benchmark. With 32 bit code it is about 4,9 times as fast in the same benchmark. So what's the magic behind MS' trunc() implementation I miss ? It couldn't be only that my ftrunc() is inlined and constants might be kept in registers; I think this wouldn't make a difference like that for the 64-bit-code. # |
Bonita Montero <Bonita.Montero@gmail.com>: Jan 03 07:01PM +0100 >> that for the 64-bit-code. > Are you statically linking to the C runtime, or are you calling a > DLL-version of the function? Wouldn't make a big difference until the code doesn't become inlined. But even then, it bet it wouldn'T 4,9 times faster. |
Bo Persson <bo@bo-persson.se>: Jan 03 06:59PM +0100 On 2021-01-03 at 18:44, Bonita Montero wrote: > It couldn't be only that my ftrunc() is inlined and constants might > be kept in registers; I think this wouldn't make a difference like > that for the 64-bit-code. Are you statically linking to the C runtime, or are you calling a DLL-version of the function? Bo Persson |
Bonita Montero <Bonita.Montero@gmail.com>: Jan 03 07:00PM +0100 > With 32 bit code my ftrunc is 1,9 times as fast in my benchmark. > With 32 bit code it is about 4,9 times as fast in the same benchmark. 64 |
Bonita Montero <Bonita.Montero@gmail.com>: Jan 03 07:14PM +0100 > Are you statically linking to the C runtime, or are you calling a > DLL-version of the function? I just tested it with linking it with /MT and /MD. The statically linked version is 21% slower; I would have expected the opposite if ever there's a difference. |
Christian Gollwitzer <auriocus@gmx.de>: Jan 04 09:18AM +0100 Am 03.01.21 um 18:44 schrieb Bonita Montero: > I've just wondered why trunc() of the MSVCRT is so slow. > So I've written my own trunc(): > So what's the magic behind MS' trunc() implementation I miss ? Look at the compiled assembly. I would expect that the library version uses SSE code to do the trunc, while yours runs at the integer ALU. Christian |
gamo <gamo@telecable.es>: Jan 03 09:17PM +0100 El 2/1/21 a las 19:12, olcott escribiΓ³: > (a) Halts > (b) Does Not Halt > (c) Pathological Self Reference to Halt Hello. You happen to have some insight in this problem. In which type do you clasify te option to halt *if* an arbitrary precision and/or repeated solution counter reach a thresold??? Thank you. Best. -- http://gamo.sdf-eu.org/ "What happens in EuroVegas it remains in EuroVegas" |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment